parent
819537d70a
commit
4532f5ecad
|
@ -1147,7 +1147,7 @@ pub const LockCmd = enum {
|
|||
};
|
||||
|
||||
/// Attempts to get lock the file, blocking if the file is locked.
|
||||
pub fn fcntlFlock(fd: fd_t, lock_cmd: LockCmd, flock_p: *const Flock) OpenError!void {
|
||||
pub fn fcntlFlock(fd: fd_t, lock_cmd: LockCmd, flock_p: *Flock) OpenError!void {
|
||||
const cmd: i32 = cmdval: {
|
||||
switch (lock_cmd) {
|
||||
.GetLock => break :cmdval F_GETLK,
|
||||
|
|
|
@ -219,8 +219,8 @@ pub fn mmap(address: ?[*]u8, length: usize, prot: usize, flags: u32, fd: i32, of
|
|||
}
|
||||
}
|
||||
|
||||
pub fn fcntl(fd: fd_t, cmd: i32, flock_p: *const c_void) usize {
|
||||
return syscall3(SYS_fcntl, @bitCast(usize, @as(isize, fd)), @bitCast(usize, @as(isize, cmd)), @ptrToInt(flock_p));
|
||||
pub fn fcntl(fd: fd_t, cmd: i32, arg: ?*c_void) usize {
|
||||
return syscall3(SYS_fcntl, @bitCast(usize, @as(isize, fd)), @bitCast(usize, @as(isize, cmd)), @ptrToInt(arg));
|
||||
}
|
||||
|
||||
pub fn mprotect(address: [*]const u8, length: usize, protection: usize) usize {
|
||||
|
|
Loading…
Reference in New Issue