File tree Expand file tree Collapse file tree 6 files changed +33
-16
lines changed
Expand file tree Collapse file tree 6 files changed +33
-16
lines changed Original file line number Diff line number Diff line change @@ -1737,7 +1737,6 @@ fn test_dragonflybsd(target: &str) {
17371737 "sem_t" => true ,
17381738 // mqd_t is a pointer on DragonFly
17391739 "mqd_t" => true ,
1740-
17411740 _ => false ,
17421741 }
17431742 } ) ;
@@ -4653,16 +4652,23 @@ fn test_linux(target: &str) {
46534652 } ) ;
46544653
46554654 let c_enums = [
4656- "tpacket_versions" ,
4657- "proc_cn_mcast_op" ,
4658- "proc_cn_event" ,
4655+ "membarrier_cmd" ,
46594656 "pid_type" ,
4657+ "proc_cn_event" ,
4658+ "proc_cn_mcast_op" ,
4659+ "tpacket_versions" ,
46604660 ] ;
46614661 cfg. alias_is_c_enum ( move |e| c_enums. contains ( & e) ) ;
46624662
46634663 // FIXME(libc): `pid_type` and `proc_cn_event` is hidden.
46644664 cfg. skip_c_enum ( |e| e == "pid_type" || e == "proc_cn_event" ) ;
46654665
4666+ cfg. skip_signededness ( move |c| match c {
4667+ // FIXME(1.0): uses the enum default signedness
4668+ "membarrier_cmd" => true ,
4669+ _ => false ,
4670+ } ) ;
4671+
46664672 cfg. skip_fn ( move |function| {
46674673 let name = function. ident ( ) ;
46684674 // skip those that are manually verified
Original file line number Diff line number Diff line change @@ -4086,6 +4086,7 @@ madvise
40864086major
40874087makedev
40884088memalign
4089+ membarrier_cmd
40894090memmem
40904091memrchr
40914092mincore
Original file line number Diff line number Diff line change 1+ //! Header: `uapi/linux/membarrier.h`
2+
3+ use crate :: prelude:: * ;
4+
5+ c_enum ! {
6+ // FIXME(1.0): incorrect repr signedness, this should be removed in a breaking change.
7+ #[ repr( c_int) ]
8+ pub enum membarrier_cmd {
9+ pub MEMBARRIER_CMD_QUERY = 0 ,
10+ pub MEMBARRIER_CMD_GLOBAL = 1 << 0 ,
11+ pub MEMBARRIER_CMD_GLOBAL_EXPEDITED = 1 << 1 ,
12+ pub MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED = 1 << 2 ,
13+ pub MEMBARRIER_CMD_PRIVATE_EXPEDITED = 1 << 3 ,
14+ pub MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED = 1 << 4 ,
15+ pub MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE = 1 << 5 ,
16+ pub MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_SYNC_CORE = 1 << 6 ,
17+ pub MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ = 1 << 7 ,
18+ pub MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_RSEQ = 1 << 8 ,
19+ }
20+ }
Original file line number Diff line number Diff line change 44
55pub ( crate ) mod can;
66pub ( crate ) mod keyctl;
7+ pub ( crate ) mod membarrier;
78pub ( crate ) mod netlink;
Original file line number Diff line number Diff line change @@ -181,6 +181,7 @@ cfg_if! {
181181 pub use linux:: can:: raw:: * ;
182182 pub use linux:: can:: * ;
183183 pub use linux:: keyctl:: * ;
184+ pub use linux:: membarrier:: * ;
184185 pub use linux:: netlink:: * ;
185186 #[ cfg( target_env = "gnu" ) ]
186187 pub use net:: route:: * ;
Original file line number Diff line number Diff line change @@ -1557,18 +1557,6 @@ pub const MPOL_F_NUMA_BALANCING: c_int = 1 << 13;
15571557pub const MPOL_F_RELATIVE_NODES : c_int = 1 << 14 ;
15581558pub const MPOL_F_STATIC_NODES : c_int = 1 << 15 ;
15591559
1560- // linux/membarrier.h
1561- pub const MEMBARRIER_CMD_QUERY : c_int = 0 ;
1562- pub const MEMBARRIER_CMD_GLOBAL : c_int = 1 << 0 ;
1563- pub const MEMBARRIER_CMD_GLOBAL_EXPEDITED : c_int = 1 << 1 ;
1564- pub const MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED : c_int = 1 << 2 ;
1565- pub const MEMBARRIER_CMD_PRIVATE_EXPEDITED : c_int = 1 << 3 ;
1566- pub const MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED : c_int = 1 << 4 ;
1567- pub const MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE : c_int = 1 << 5 ;
1568- pub const MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_SYNC_CORE : c_int = 1 << 6 ;
1569- pub const MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ : c_int = 1 << 7 ;
1570- pub const MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_RSEQ : c_int = 1 << 8 ;
1571-
15721560pub const PTHREAD_MUTEX_INITIALIZER : crate :: pthread_mutex_t = crate :: pthread_mutex_t {
15731561 size : [ 0 ; crate :: __SIZEOF_PTHREAD_MUTEX_T] ,
15741562} ;
You can’t perform that action at this time.
0 commit comments