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;
66//////////////////////////
77
88pub const Message = struct {
9 sender: MailboxId,
9sender: MailboxId,
1010 receiver: MailboxId,
1111 code: usize,
1212 args: [5]usize,
......@@ -152,7 +152,7 @@ pub fn subscribeIRQ(irq: u8, mailbox_id: *const MailboxId) void {
152152}
153153
154154pub fn inb(port: u16) u8 {
155 return u8(syscall1(Syscall.inb, port));
155 return @intCast(u8, syscall1(Syscall.inb, port));
156156}
157157
158158pub fn outb(port: u16, value: u8) void {
......@@ -160,7 +160,7 @@ pub fn outb(port: u16, value: u8) void {
160160}
161161
162162pub 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;
164164}
165165
166166pub fn createThread(function: fn () void) u16 {