@@ -117,46 +117,49 @@ struct acl_pthread_condattr_t {
117117struct timespec {
118118 time_t tv_sec ; /* Seconds. */
119119 long int tv_nsec ; /* Nanoseconds. */
120- #if 0
121- long int tv_msec ; /* millisecond, add by zsx */
122- #endif
123120};
124121
125122/* in acl_pthread.c */
126123ACL_API void acl_pthread_end (void );
127- ACL_API int acl_pthread_once (acl_pthread_once_t * once_control , void (* init_routine )(void ));
128- ACL_API int acl_pthread_key_create (acl_pthread_key_t * key_ptr , void (* destructor )(void * ));
124+ ACL_API int acl_pthread_once (acl_pthread_once_t * once_control ,
125+ void (* init_routine )(void ));
126+ ACL_API int acl_pthread_key_create (acl_pthread_key_t * key_ptr ,
127+ void (* destructor )(void * ));
129128ACL_API void * acl_pthread_getspecific (acl_pthread_key_t key );
130129ACL_API int acl_pthread_setspecific (acl_pthread_key_t key , void * value );
131130ACL_API int acl_pthread_attr_init (acl_pthread_attr_t * attr );
132- ACL_API int acl_pthread_attr_setstacksize (acl_pthread_attr_t * attr , size_t stacksize );
133- ACL_API int acl_pthread_attr_setdetachstate (acl_pthread_attr_t * attr , int detached );
131+ ACL_API int acl_pthread_attr_setstacksize (acl_pthread_attr_t * attr ,
132+ size_t stacksize );
133+ ACL_API int acl_pthread_attr_setdetachstate (acl_pthread_attr_t * attr ,
134+ int detached );
134135ACL_API int acl_pthread_attr_destroy (acl_pthread_attr_t * thr_attr );
135136ACL_API unsigned long acl_pthread_self (void );
136- ACL_API int acl_pthread_create (acl_pthread_t * thread ,
137- acl_pthread_attr_t * attr ,
138- void * (* start_routine )(void * ),
139- void * arg );
137+ ACL_API int acl_pthread_create (acl_pthread_t * thread ,
138+ acl_pthread_attr_t * attr , void * (* start_routine )(void * ),
139+ void * arg );
140140ACL_API int acl_pthread_detach (acl_pthread_t thread );
141141ACL_API int acl_pthread_join (acl_pthread_t thread , void * * thread_return );
142142
143143/* in acl_pthread_mutex.c */
144144ACL_API int acl_pthread_mutex_destroy (acl_pthread_mutex_t * mutex );
145- ACL_API int acl_pthread_mutex_init (acl_pthread_mutex_t * mutex , const acl_pthread_mutexattr_t * mattr );
145+ ACL_API int acl_pthread_mutex_init (acl_pthread_mutex_t * mutex ,
146+ const acl_pthread_mutexattr_t * mattr );
146147ACL_API int acl_pthread_mutex_lock (acl_pthread_mutex_t * mutex );
147148ACL_API int acl_pthread_mutex_unlock (acl_pthread_mutex_t * mutex );
148149
149150#define acl_pthread_mutex_trylock acl_pthread_mutex_lock
150151
151152/* in acl_pthread_cond.c */
152- ACL_API int acl_pthread_cond_init (acl_pthread_cond_t * cond , acl_pthread_condattr_t * cond_attr );
153+ ACL_API int acl_pthread_cond_init (acl_pthread_cond_t * cond ,
154+ acl_pthread_condattr_t * cond_attr );
153155ACL_API acl_pthread_cond_t * acl_pthread_cond_create (void );
154156ACL_API int acl_pthread_cond_destroy (acl_pthread_cond_t * cond );
155157ACL_API int acl_pthread_cond_signal (acl_pthread_cond_t * cond );
156158ACL_API int acl_pthread_cond_broadcast (acl_pthread_cond_t * cond );
157- ACL_API int acl_pthread_cond_timedwait (acl_pthread_cond_t * cond , acl_pthread_mutex_t * mutex ,
158- const struct timespec * timeout );
159- ACL_API int acl_pthread_cond_wait (acl_pthread_cond_t * cond , acl_pthread_mutex_t * mutex );
159+ ACL_API int acl_pthread_cond_timedwait (acl_pthread_cond_t * cond ,
160+ acl_pthread_mutex_t * mutex , const struct timespec * timeout );
161+ ACL_API int acl_pthread_cond_wait (acl_pthread_cond_t * cond ,
162+ acl_pthread_mutex_t * mutex );
160163
161164#endif /* !ACL_HAS_PTHREAD */
162165
@@ -176,7 +179,8 @@ ACL_API int acl_pthread_atexit_remove(void *arg, void (*free_callback)(void*));
176179ACL_API int acl_pthread_tls_set_max (int max );
177180ACL_API int acl_pthread_tls_get_max (void );
178181ACL_API void * acl_pthread_tls_get (acl_pthread_key_t * key_ptr );
179- ACL_API int acl_pthread_tls_set (acl_pthread_key_t key , void * ptr , void (* free_fn )(void * ));
182+ ACL_API int acl_pthread_tls_set (acl_pthread_key_t key , void * ptr ,
183+ void (* free_fn )(void * ));
180184ACL_API int acl_pthread_tls_del (acl_pthread_key_t key );
181185ACL_API void acl_pthread_tls_once_get (acl_pthread_once_t * control_once );
182186ACL_API void acl_pthread_tls_once_set (acl_pthread_once_t control_once );
0 commit comments