File tree Expand file tree Collapse file tree 3 files changed +11
-19
lines changed
Expand file tree Collapse file tree 3 files changed +11
-19
lines changed Original file line number Diff line number Diff line change 11use crate :: prelude:: * ;
22
33extern "C" {
4- #[ cfg( target_os = "linux" ) ]
4+ #[ cfg( any ( target_os = "linux" , target_os = "l4re" ) ) ]
55 pub fn pthread_getaffinity_np (
66 thread : crate :: pthread_t ,
77 cpusetsize : size_t ,
@@ -13,7 +13,7 @@ extern "C" {
1313 #[ cfg( target_os = "linux" ) ]
1414 pub fn pthread_getname_np ( thread : crate :: pthread_t , name : * mut c_char , len : size_t ) -> c_int ;
1515
16- #[ cfg( target_os = "linux" ) ]
16+ #[ cfg( any ( target_os = "linux" , target_os = "l4re" ) ) ]
1717 pub fn pthread_setaffinity_np (
1818 thread : crate :: pthread_t ,
1919 cpusetsize : size_t ,
Original file line number Diff line number Diff line change @@ -122,12 +122,7 @@ extern "C" {
122122 #[ cfg( any( target_os = "l4re" , all( target_os = "linux" , not( target_env = "ohos" ) ) ) ) ]
123123 pub fn pthread_cancel ( thread : crate :: pthread_t ) -> c_int ;
124124
125- #[ cfg( any(
126- target_os = "android" ,
127- target_os = "emscripten" ,
128- target_os = "linux" ,
129- target_os = "l4re" ,
130- ) ) ]
125+ #[ cfg( any( target_os = "android" , target_os = "emscripten" , target_os = "linux" , ) ) ]
131126 pub fn pthread_condattr_getclock (
132127 attr : * const crate :: pthread_condattr_t ,
133128 clock_id : * mut crate :: clockid_t ,
@@ -144,12 +139,7 @@ extern "C" {
144139 pshared : * mut c_int ,
145140 ) -> c_int ;
146141
147- #[ cfg( any(
148- target_os = "android" ,
149- target_os = "emscripten" ,
150- target_os = "linux" ,
151- target_os = "l4re" ,
152- ) ) ]
142+ #[ cfg( any( target_os = "android" , target_os = "emscripten" , target_os = "linux" , ) ) ]
153143 pub fn pthread_condattr_setclock (
154144 attr : * mut crate :: pthread_condattr_t ,
155145 clock_id : crate :: clockid_t ,
Original file line number Diff line number Diff line change 33//! Note that The l4re port of uclibc doesn't yet support all `pthread_*` API that is
44//! available upstream.
55
6- pub use crate :: new:: common:: linux_like:: pthread:: pthread_getattr_np;
7- #[ cfg( not( target_os = "l4re" ) ) ]
86pub use crate :: new:: common:: linux_like:: pthread:: {
97 pthread_getaffinity_np,
10- pthread_getname_np ,
8+ pthread_getattr_np ,
119 pthread_setaffinity_np,
10+ } ;
11+ #[ cfg( not( target_os = "l4re" ) ) ]
12+ pub use crate :: new:: common:: linux_like:: pthread:: {
13+ pthread_getname_np,
1214 pthread_setname_np,
1315} ;
1416#[ cfg( not( target_os = "l4re" ) ) ]
1517pub use crate :: new:: common:: posix:: pthread:: {
1618 pthread_atfork,
1719 pthread_barrierattr_getpshared,
20+ pthread_condattr_getclock,
21+ pthread_condattr_setclock,
1822 pthread_getcpuclockid,
1923 pthread_mutex_consistent,
2024 pthread_mutexattr_getprotocol,
@@ -41,9 +45,7 @@ pub use crate::new::common::posix::pthread::{
4145 pthread_barrierattr_init,
4246 pthread_barrierattr_setpshared,
4347 pthread_cancel,
44- pthread_condattr_getclock,
4548 pthread_condattr_getpshared,
46- pthread_condattr_setclock,
4749 pthread_condattr_setpshared,
4850 pthread_create,
4951 pthread_getschedparam,
You can’t perform that action at this time.
0 commit comments