File tree Expand file tree Collapse file tree 7 files changed +23
-0
lines changed Expand file tree Collapse file tree 7 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -1559,6 +1559,8 @@ extern {
15591559 pub fn lio_listio ( mode : :: c_int , aiocb_list : * const * mut aiocb ,
15601560 nitems : :: c_int , sevp : * mut sigevent ) -> :: c_int ;
15611561
1562+ pub fn dirfd ( dirp : * mut :: DIR ) -> :: c_int ;
1563+
15621564 pub fn lutimes ( file : * const :: c_char , times : * const :: timeval ) -> :: c_int ;
15631565
15641566 pub fn getutxent ( ) -> * mut utmpx ;
Original file line number Diff line number Diff line change @@ -918,6 +918,7 @@ extern {
918918 pub fn aio_cancel ( fd : :: c_int , aiocbp : * mut aiocb ) -> :: c_int ;
919919 pub fn lio_listio ( mode : :: c_int , aiocb_list : * const * mut aiocb ,
920920 nitems : :: c_int , sevp : * mut sigevent ) -> :: c_int ;
921+ pub fn dirfd ( dirp : * mut :: DIR ) -> :: c_int ;
921922 pub fn getnameinfo ( sa : * const :: sockaddr ,
922923 salen : :: socklen_t ,
923924 host : * mut :: c_char ,
Original file line number Diff line number Diff line change @@ -644,6 +644,15 @@ pub const P_PGID: idtype_t = 4;
644644pub const B460800 : :: speed_t = 460800 ;
645645pub const B921600 : :: speed_t = 921600 ;
646646
647+ // dirfd() is a macro on netbsd to access
648+ // the first field of the struct where dirp points to:
649+ // http://cvsweb.netbsd.org/bsdweb.cgi/src/include/dirent.h?rev=1.36
650+ f ! {
651+ pub fn dirfd( dirp: * mut :: DIR ) -> :: c_int {
652+ unsafe { * ( dirp as * const :: c_int) }
653+ }
654+ }
655+
647656extern {
648657 pub fn aio_read ( aiocbp : * mut aiocb ) -> :: c_int ;
649658 pub fn aio_write ( aiocbp : * mut aiocb ) -> :: c_int ;
Original file line number Diff line number Diff line change @@ -457,6 +457,7 @@ pub const KI_MAXLOGNAME: ::c_int = 32;
457457pub const KI_EMULNAMELEN : :: c_int = 8 ;
458458
459459extern {
460+ pub fn dirfd ( dirp : * mut :: DIR ) -> :: c_int ;
460461 pub fn getnameinfo ( sa : * const :: sockaddr ,
461462 salen : :: socklen_t ,
462463 host : * mut :: c_char ,
Original file line number Diff line number Diff line change @@ -749,6 +749,7 @@ extern {
749749 pub fn ioctl ( fd : :: c_int , request : :: c_int , ...) -> :: c_int ;
750750 pub fn mprotect ( addr : * const :: c_void , len : :: size_t , prot : :: c_int )
751751 -> :: c_int ;
752+ pub fn dirfd ( dirp : * mut :: DIR ) -> :: c_int ;
752753 pub fn getnameinfo ( sa : * const :: sockaddr ,
753754 salen : :: socklen_t ,
754755 host : * mut :: c_char ,
Original file line number Diff line number Diff line change @@ -1040,6 +1040,8 @@ extern {
10401040 serv : * mut :: c_char ,
10411041 sevlen : :: socklen_t ,
10421042 flags : :: c_int ) -> :: c_int ;
1043+ pub fn pthread_setschedprio ( native : :: pthread_t ,
1044+ priority : :: c_int ) -> :: c_int ;
10431045 pub fn prlimit ( pid : :: pid_t , resource : :: c_int , new_limit : * const :: rlimit ,
10441046 old_limit : * mut :: rlimit ) -> :: c_int ;
10451047 pub fn prlimit64 ( pid : :: pid_t ,
Original file line number Diff line number Diff line change @@ -835,6 +835,7 @@ extern {
835835 rqtp : * const :: timespec ,
836836 rmtp : * mut :: timespec ) -> :: c_int ;
837837 pub fn clock_settime ( clk_id : clockid_t , tp : * const :: timespec ) -> :: c_int ;
838+ pub fn dirfd ( dirp : * mut :: DIR ) -> :: c_int ;
838839 pub fn settimeofday ( tv : * const :: timeval , tz : * const :: timezone ) -> :: c_int ;
839840
840841 pub fn prctl ( option : :: c_int , ...) -> :: c_int ;
@@ -962,6 +963,12 @@ extern {
962963 pshared : :: c_int ) -> :: c_int ;
963964 pub fn pthread_condattr_getpshared ( attr : * const pthread_condattr_t ,
964965 pshared : * mut :: c_int ) -> :: c_int ;
966+ pub fn pthread_getschedparam ( native : :: pthread_t ,
967+ policy : * mut :: c_int ,
968+ param : * mut :: sched_param ) -> :: c_int ;
969+ pub fn pthread_setschedparam ( native : :: pthread_t ,
970+ policy : :: c_int ,
971+ param : * const :: sched_param ) -> :: c_int ;
965972 pub fn sched_getaffinity ( pid : :: pid_t ,
966973 cpusetsize : :: size_t ,
967974 cpuset : * mut cpu_set_t ) -> :: c_int ;
You can’t perform that action at this time.
0 commit comments