Skip to content

Commit 2f931d9

Browse files
authored
Merge pull request #4043 from jackorobot/vxworks-flock
flock for vxworks using ioctl
2 parents 0569274 + 1256e15 commit 2f931d9

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/vxworks/mod.rs

+11
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,14 @@ s! {
412412
pub mq_flags: ::c_long,
413413
pub mq_curmsgs: ::c_long,
414414
}
415+
416+
pub struct flock {
417+
pub l_type: ::c_short,
418+
pub l_whence: ::c_short,
419+
pub l_start: ::c_long,
420+
pub l_len: ::c_long,
421+
pub l_pid: ::c_long,
422+
}
415423
}
416424

417425
s_no_extra_traits! {
@@ -940,6 +948,9 @@ pub const F_GETLK: ::c_int = 7;
940948
pub const F_SETLK: ::c_int = 8;
941949
pub const F_SETLKW: ::c_int = 9;
942950
pub const F_DUPFD_CLOEXEC: ::c_int = 14;
951+
pub const F_RDLCK: ::c_int = 1;
952+
pub const F_WRLCK: ::c_int = 2;
953+
pub const F_UNLCK: ::c_int = 3;
943954

944955
// signal.h
945956
pub const SIG_DFL: sighandler_t = 0 as sighandler_t;

0 commit comments

Comments
 (0)