File tree Expand file tree Collapse file tree 3 files changed +24
-0
lines changed
src/unix/bsd/netbsdlike/openbsd Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -434,6 +434,7 @@ fn test_openbsd(target: &str) {
434434 "signal.h" ,
435435 "string.h" ,
436436 "sys/file.h" ,
437+ "sys/futex.h" ,
437438 "sys/ioctl.h" ,
438439 "sys/ipc.h" ,
439440 "sys/mman.h" ,
@@ -505,6 +506,9 @@ fn test_openbsd(target: &str) {
505506 // https://marc.info/?l=openbsd-cvs&m=154723400730318
506507 "mincore" => true ,
507508
509+ // futex() has volatile arguments, but that doesn't exist in Rust.
510+ "futex" => true ,
511+
508512 _ => false ,
509513 }
510514 } ) ;
Original file line number Diff line number Diff line change @@ -215,6 +215,10 @@ FIONREAD
215215FIOSETOWN
216216FLUSHO
217217FOPEN_MAX
218+ FUTEX_WAIT
219+ FUTEX_WAKE
220+ FUTEX_REQUEUE
221+ FUTEX_PRIVATE_FLAG
218222F_GETOWN
219223F_LOCK
220224F_RDLCK
@@ -987,6 +991,7 @@ fsid_t
987991fstatfs
988992ftok
989993fusefs_args
994+ futex
990995futimes
991996getdomainname
992997getdtablesize
Original file line number Diff line number Diff line change @@ -1519,6 +1519,12 @@ pub const WCONTINUED: ::c_int = 8;
15191519pub const FIND : :: ACTION = 0 ;
15201520pub const ENTER : :: ACTION = 1 ;
15211521
1522+ // futex.h
1523+ pub const FUTEX_WAIT : :: c_int = 1 ;
1524+ pub const FUTEX_WAKE : :: c_int = 2 ;
1525+ pub const FUTEX_REQUEUE : :: c_int = 3 ;
1526+ pub const FUTEX_PRIVATE_FLAG : :: c_int = 128 ;
1527+
15221528const_fn ! {
15231529 { const } fn _ALIGN( p: usize ) -> usize {
15241530 ( p + _ALIGNBYTES) & !_ALIGNBYTES
@@ -1703,6 +1709,15 @@ extern "C" {
17031709 pub fn hcreate ( nelt : :: size_t ) -> :: c_int ;
17041710 pub fn hdestroy ( ) ;
17051711 pub fn hsearch ( entry : :: ENTRY , action : :: ACTION ) -> * mut :: ENTRY ;
1712+
1713+ // futex.h
1714+ pub fn futex (
1715+ uaddr : * mut u32 ,
1716+ op : :: c_int ,
1717+ val : :: c_int ,
1718+ timeout : * const :: timespec ,
1719+ uaddr2 : * mut u32 ,
1720+ ) -> :: c_int ;
17061721}
17071722
17081723#[ link( name = "execinfo" ) ]
You can’t perform that action at this time.
0 commit comments