@@ -36,6 +36,18 @@ extern "C" {
3636 policy : * mut c_int ,
3737 ) -> c_int ;
3838
39+ #[ cfg( any(
40+ target_os = "android" ,
41+ target_os = "emscripten" ,
42+ target_os = "linux" ,
43+ target_os = "l4re"
44+ ) ) ]
45+ pub fn pthread_attr_getstack (
46+ attr : * const crate :: pthread_attr_t ,
47+ stackaddr : * mut * mut c_void ,
48+ stacksize : * mut size_t ,
49+ ) -> c_int ;
50+
3951 #[ cfg( any( target_os = "android" , target_os = "linux" ) ) ]
4052 pub fn pthread_attr_setguardsize ( attr : * mut crate :: pthread_attr_t , guardsize : size_t ) -> c_int ;
4153
@@ -54,6 +66,18 @@ extern "C" {
5466 #[ cfg( target_os = "linux" ) ]
5567 pub fn pthread_attr_setschedpolicy ( attr : * mut crate :: pthread_attr_t , policy : c_int ) -> c_int ;
5668
69+ #[ cfg( any(
70+ target_os = "android" ,
71+ target_os = "emscripten" ,
72+ target_os = "linux" ,
73+ target_os = "l4re"
74+ ) ) ]
75+ pub fn pthread_attr_setstack (
76+ attr : * mut crate :: pthread_attr_t ,
77+ stackaddr : * mut c_void ,
78+ stacksize : size_t ,
79+ ) -> c_int ;
80+
5781 #[ cfg( any( target_os = "android" , target_os = "linux" ) ) ]
5882 pub fn pthread_barrier_destroy ( barrier : * mut crate :: pthread_barrier_t ) -> c_int ;
5983
@@ -88,12 +112,45 @@ extern "C" {
88112 #[ cfg( all( target_os = "linux" , not( target_env = "ohos" ) ) ) ]
89113 pub fn pthread_cancel ( thread : crate :: pthread_t ) -> c_int ;
90114
115+ #[ cfg( any(
116+ target_os = "android" ,
117+ target_os = "emscripten" ,
118+ target_os = "linux" ,
119+ target_os = "l4re"
120+ ) ) ]
121+ pub fn pthread_condattr_getclock (
122+ attr : * const crate :: pthread_condattr_t ,
123+ clock_id : * mut crate :: clockid_t ,
124+ ) -> c_int ;
125+
91126 #[ cfg( any( target_os = "android" , target_os = "linux" ) ) ]
92127 pub fn pthread_condattr_getpshared (
93128 attr : * const crate :: pthread_condattr_t ,
94129 pshared : * mut c_int ,
95130 ) -> c_int ;
96131
132+ #[ cfg( any(
133+ target_os = "android" ,
134+ target_os = "emscripten" ,
135+ target_os = "linux" ,
136+ target_os = "l4re"
137+ ) ) ]
138+ pub fn pthread_condattr_setclock (
139+ attr : * mut crate :: pthread_condattr_t ,
140+ clock_id : crate :: clockid_t ,
141+ ) -> c_int ;
142+
143+ #[ cfg( any(
144+ target_os = "android" ,
145+ target_os = "emscripten" ,
146+ target_os = "linux" ,
147+ target_os = "l4re"
148+ ) ) ]
149+ pub fn pthread_condattr_setpshared (
150+ attr : * mut crate :: pthread_condattr_t ,
151+ pshared : c_int ,
152+ ) -> c_int ;
153+
97154 #[ cfg( any( target_os = "android" , target_os = "emscripten" , target_os = "linux" ) ) ]
98155 pub fn pthread_create (
99156 native : * mut crate :: pthread_t ,
@@ -151,12 +208,45 @@ extern "C" {
151208 protocol : c_int ,
152209 ) -> c_int ;
153210
211+ #[ cfg( any(
212+ target_os = "android" ,
213+ target_os = "emscripten" ,
214+ target_os = "linux" ,
215+ target_os = "l4re"
216+ ) ) ]
217+ pub fn pthread_mutexattr_setpshared (
218+ attr : * mut crate :: pthread_mutexattr_t ,
219+ pshared : c_int ,
220+ ) -> c_int ;
221+
154222 #[ cfg( all( target_os = "linux" , not( target_env = "ohos" ) ) ) ]
155223 pub fn pthread_mutexattr_setrobust (
156224 attr : * mut crate :: pthread_mutexattr_t ,
157225 robustness : c_int ,
158226 ) -> c_int ;
159227
228+ #[ cfg( any(
229+ target_os = "android" ,
230+ target_os = "emscripten" ,
231+ target_os = "linux" ,
232+ target_os = "l4re"
233+ ) ) ]
234+ pub fn pthread_rwlockattr_getpshared (
235+ attr : * const crate :: pthread_rwlockattr_t ,
236+ val : * mut c_int ,
237+ ) -> c_int ;
238+
239+ #[ cfg( any(
240+ target_os = "android" ,
241+ target_os = "emscripten" ,
242+ target_os = "linux" ,
243+ target_os = "l4re"
244+ ) ) ]
245+ pub fn pthread_rwlockattr_setpshared (
246+ attr : * mut crate :: pthread_rwlockattr_t ,
247+ val : c_int ,
248+ ) -> c_int ;
249+
160250 #[ cfg( target_os = "linux" ) ]
161251 pub fn pthread_once ( control : * mut crate :: pthread_once_t , routine : extern "C" fn ( ) ) -> c_int ;
162252
0 commit comments