@@ -50,6 +50,8 @@ pub type sctp_assoc_t = u32;
50
50
51
51
pub type eventfd_t = u64 ;
52
52
53
+ pub type seqc_t = u32 ;
54
+
53
55
#[ cfg_attr( feature = "extra_traits" , derive( Debug , Hash , PartialEq , Eq ) ) ]
54
56
#[ repr( u32 ) ]
55
57
pub enum devstat_support_flags {
@@ -1355,6 +1357,66 @@ s! {
1355
1357
pub strchange_instrms: u16 ,
1356
1358
pub strchange_outstrms: u16 ,
1357
1359
}
1360
+
1361
+ pub struct filedesc {
1362
+ pub fd_files: * mut fdescenttbl,
1363
+ pub fd_map: * mut c_void,
1364
+ pub fd_freefile: c_int,
1365
+ pub fd_refcnt: c_int,
1366
+ pub fd_holdcnt: c_int,
1367
+ pub fd_sx: sx,
1368
+ pub 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
+ pub fdt_ofiles: [ filedescent; 0 ] ,
1376
+ }
1377
+
1378
+ pub struct filedescent {
1379
+ // This is normally `struct file`.
1380
+ pub fde_file: * mut c_void,
1381
+ pub fde_caps: filecaps,
1382
+ pub fde_flags: u8 ,
1383
+ pub fde_seqc: seqc_t,
1384
+ }
1385
+
1386
+ pub struct filecaps {
1387
+ pub fc_rights: crate :: cap_rights_t,
1388
+ pub fc_ioctls: * mut c_ulong,
1389
+ pub fc_nioctls: i16 ,
1390
+ pub fc_fcntls: u32 ,
1391
+ }
1392
+
1393
+ pub struct sx {
1394
+ pub lock_object: lock_object,
1395
+ pub sx_lock: crate :: uintptr_t,
1396
+ }
1397
+
1398
+ pub struct lock_object {
1399
+ pub lo_name: * const c_char,
1400
+ pub lo_flags: c_uint,
1401
+ pub lo_data: c_uint,
1402
+ // This is normally `struct witness`.
1403
+ pub lo_witness: * mut c_void,
1404
+ }
1405
+
1406
+ pub struct kqueue { }
1407
+
1408
+ pub struct kqlist {
1409
+ pub tqh_first: * mut kqueue,
1410
+ pub tqh_last: * mut * mut kqueue,
1411
+ pub trace: qm_trace,
1412
+ }
1413
+
1414
+ pub struct qm_trace {
1415
+ pub lastline: c_ulong,
1416
+ pub prevline: c_ulong,
1417
+ pub lastfile: * const c_char,
1418
+ pub prevfile: * const c_char,
1419
+ }
1358
1420
}
1359
1421
1360
1422
s_no_extra_traits ! {
0 commit comments