Skip to content

Commit 6150594

Browse files
Add missing items in FreeBSD
1 parent 094464b commit 6150594

File tree

1 file changed

+48
-0
lines changed
  • src/unix/bsd/freebsdlike/freebsd

1 file changed

+48
-0
lines changed

src/unix/bsd/freebsdlike/freebsd/mod.rs

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ pub type sctp_assoc_t = u32;
5050

5151
pub type eventfd_t = u64;
5252

53+
pub type seqc_t = u32;
54+
5355
#[cfg_attr(feature = "extra_traits", derive(Debug, Hash, PartialEq, Eq))]
5456
#[repr(u32)]
5557
pub enum devstat_support_flags {
@@ -1355,6 +1357,52 @@ s! {
13551357
pub strchange_instrms: u16,
13561358
pub strchange_outstrms: u16,
13571359
}
1360+
1361+
pub struct filedesc {
1362+
pub fd_files: *mut fdescenttbl,
1363+
pub fd_map: *mut c_ulong,
1364+
pub fd_freefile: c_int,
1365+
pub fd_refcnt: c_int,
1366+
pub fd_holdcnt: c_int,
1367+
fd_sx: sx,
1368+
fd_kqlist: kqlist,
1369+
pub fd_holdleaderscount: c_int,
1370+
pub fd_holdleaderswakeup: c_int,
1371+
}
1372+
1373+
pub struct fdescenttbl {
1374+
pub fdt_nfiles: c_int,
1375+
fdt_ofiles: [*mut c_void; 0],
1376+
}
1377+
1378+
#[doc(hidden)]
1379+
pub struct sx {
1380+
lock_object: lock_object,
1381+
sx_lock: crate::uintptr_t,
1382+
}
1383+
1384+
pub struct lock_object {
1385+
pub lo_name: *const c_char,
1386+
pub lo_flags: c_uint,
1387+
pub lo_data: c_uint,
1388+
// This is normally `struct witness`.
1389+
lo_witness: *mut c_void,
1390+
}
1391+
1392+
#[doc(hidden)]
1393+
pub struct kqlist {
1394+
tqh_first: *mut c_void,
1395+
tqh_last: *mut *mut c_void,
1396+
trace: qm_trace,
1397+
}
1398+
1399+
#[doc(hidden)]
1400+
pub struct qm_trace {
1401+
lastline: c_ulong,
1402+
prevline: c_ulong,
1403+
lastfile: *const c_char,
1404+
prevfile: *const c_char,
1405+
}
13581406
}
13591407

13601408
s_no_extra_traits! {

0 commit comments

Comments
 (0)