Use opaque type for semaphore on DragonFly

This commit is contained in:
Michael Neumann 2016-12-04 12:21:46 +01:00
parent 18c11223e1
commit 4e3d0821ba
3 changed files with 10 additions and 6 deletions

View File

@ -14,6 +14,10 @@ pub type uuid_t = ::uuid;
pub type fsblkcnt_t = u64;
pub type fsfilcnt_t = u64;
pub type sem_t = *mut sem;
pub enum sem {}
s! {
pub struct aiocb {
pub aio_fildes: ::c_int,

View File

@ -5,6 +5,7 @@ pub type lwpid_t = i32;
pub type nlink_t = u16;
pub type blksize_t = u32;
pub type clockid_t = ::c_int;
pub type sem_t = _sem;
pub type fsblkcnt_t = ::uint64_t;
pub type fsfilcnt_t = ::uint64_t;
@ -59,6 +60,11 @@ s! {
pub f_fsid: ::c_ulong,
pub f_namemax: ::c_ulong,
}
// internal structure has changed over time
pub struct _sem {
data: [u32; 4],
}
}
pub const SIGEV_THREAD_ID: ::c_int = 4;

View File

@ -12,7 +12,6 @@ pub type tcflag_t = ::c_uint;
pub type speed_t = ::c_uint;
pub type nl_item = ::c_int;
pub type id_t = i64;
pub type sem_t = _sem;
pub enum timezone {}
@ -170,11 +169,6 @@ s! {
pub int_p_sign_posn: ::c_char,
pub int_n_sign_posn: ::c_char,
}
// internal structure has changed over time
pub struct _sem {
data: [u32; 4],
}
}
pub const AIO_LISTIO_MAX: ::c_int = 16;