authorgravatar for andrea@orru.ioAndrea Orru <andrea@orru.io> 2018-08-06 02:29:11-04:00
committergravatar for andrea@orru.ioAndrea Orru <andrea@orru.io> 2018-08-06 02:29:11-04:00
log641066d82e1701d34acb81cb4bfed95405c5b506
tree8f26ec9b99967e982efc0514ec1ab4f35451c9d6
parentd2f5e57b68da0b16e5789ca19045ccbcb4ecfa8d

Fix casts


1 files changed, 3 insertions(+), 3 deletions(-)

std/os/zen.zig+3-3
...@@ -6,7 +6,7 @@ const assert = std.debug.assert;...@@ -6,7 +6,7 @@ const assert = std.debug.assert;
6//////////////////////////6//////////////////////////
77
8pub const Message = struct {8pub const Message = struct {
9 sender: MailboxId,9sender: MailboxId,
10 receiver: MailboxId,10 receiver: MailboxId,
11 code: usize,11 code: usize,
12 args: [5]usize,12 args: [5]usize,
...@@ -152,7 +152,7 @@ pub fn subscribeIRQ(irq: u8, mailbox_id: *const MailboxId) void {...@@ -152,7 +152,7 @@ pub fn subscribeIRQ(irq: u8, mailbox_id: *const MailboxId) void {
152}152}
153153
154pub fn inb(port: u16) u8 {154pub fn inb(port: u16) u8 {
155 return u8(syscall1(Syscall.inb, port));155 return @intCast(u8, syscall1(Syscall.inb, port));
156}156}
157157
158pub fn outb(port: u16, value: u8) void {158pub fn outb(port: u16, value: u8) void {
...@@ -160,7 +160,7 @@ pub fn outb(port: u16, value: u8) void {...@@ -160,7 +160,7 @@ pub fn outb(port: u16, value: u8) void {
160}160}
161161
162pub fn map(v_addr: usize, p_addr: usize, size: usize, writable: bool) bool {162pub fn map(v_addr: usize, p_addr: usize, size: usize, writable: bool) bool {
163 return syscall4(Syscall.map, v_addr, p_addr, size, usize(writable)) != 0;163 return syscall4(Syscall.map, v_addr, p_addr, size, @boolToInt(writable)) != 0;
164}164}
165165
166pub fn createThread(function: fn () void) u16 {166pub fn createThread(function: fn () void) u16 {