Changeset 400 for asp3_tinet_ecnl_rx/trunk/musl-1.1.18/src/thread
- Timestamp:
- Jun 7, 2019, 10:13:19 PM (5 years ago)
- Location:
- asp3_tinet_ecnl_rx/trunk/musl-1.1.18/src/thread
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
asp3_tinet_ecnl_rx/trunk/musl-1.1.18/src/thread/__set_thread_area.c
r337 r400 3 3 int __set_thread_area(void *p) 4 4 { 5 #ifndef __c2__6 5 __asm__ __volatile__ ( "mvtc %0, fintv" : : "r"(p) : "memory" ); 7 6 return 0; 8 #else9 #ifdef SYS_set_thread_area10 return __syscall(SYS_set_thread_area, p);11 #else12 return -ENOSYS;13 #endif14 #endif15 7 } -
asp3_tinet_ecnl_rx/trunk/musl-1.1.18/src/thread/__syscall_cp.c
r342 r400 2 2 #include "syscall.h" 3 3 4 #undef sccp5 4 __attribute__((__visibility__("hidden"))) 6 5 long __syscall_cp_c(); … … 13 12 } 14 13 15 #ifndef __c2__16 14 weak_alias(sccp, __syscall_cp_c); 17 #else18 long __syscall_cp_c(syscall_arg_t nr,19 syscall_arg_t u, syscall_arg_t v, syscall_arg_t w,20 syscall_arg_t x, syscall_arg_t y, syscall_arg_t z)21 {22 return sccp(nr, u, v, w, x, y, z);23 }24 #endif25 15 26 16 long (__syscall_cp)(syscall_arg_t nr, -
asp3_tinet_ecnl_rx/trunk/musl-1.1.18/src/thread/__tls_get_addr.c
r337 r400 14 14 } 15 15 16 #ifndef __c2__17 16 weak_alias(__tls_get_addr, __tls_get_new); 18 #endif -
asp3_tinet_ecnl_rx/trunk/musl-1.1.18/src/thread/pthread_cleanup_push.c
r337 r400 1 1 #include "pthread_impl.h" 2 2 3 #ifndef __c2__4 3 static void dummy(struct __ptcb *cb) 5 4 { … … 7 6 weak_alias(dummy, __do_cleanup_push); 8 7 weak_alias(dummy, __do_cleanup_pop); 9 #else10 extern void __do_cleanup_push(struct __ptcb *cb);11 extern void __do_cleanup_pop(struct __ptcb *cb);12 #endif13 8 14 9 void _pthread_cleanup_push(struct __ptcb *cb, void (*f)(void *), void *x) -
asp3_tinet_ecnl_rx/trunk/musl-1.1.18/src/thread/pthread_cond_timedwait.c
r337 r400 212 212 } 213 213 214 #ifndef __c2__215 214 weak_alias(__pthread_cond_timedwait, pthread_cond_timedwait); 216 #else217 int pthread_cond_timedwait(pthread_cond_t *restrict c, pthread_mutex_t *restrict m, const struct timespec *restrict ts)218 {219 return __pthread_cond_timedwait(c, m, ts);220 }221 #endif -
asp3_tinet_ecnl_rx/trunk/musl-1.1.18/src/thread/pthread_create.c
r337 r400 14 14 { 15 15 } 16 #ifndef __c2__17 16 weak_alias(dummy_0, __acquire_ptc); 18 17 weak_alias(dummy_0, __release_ptc); 19 #else20 extern void __acquire_ptc();21 extern void __release_ptc();22 #endif23 18 weak_alias(dummy_0, __pthread_tsd_run_dtors); 24 19 weak_alias(dummy_0, __do_orphaned_stdio_locks); … … 168 163 169 164 /* pthread_key_create.c overrides this */ 170 #ifndef __c2__171 165 static volatile size_t dummy = 0; 172 166 weak_alias(dummy, __pthread_tsd_size); 173 167 static void *dummy_tsd[1] = { 0 }; 174 168 weak_alias(dummy_tsd, __pthread_tsd_main); 175 #else176 extern volatile size_t __pthread_tsd_size;177 extern void *__pthread_tsd_main;178 #endif179 169 180 170 volatile int __block_new_threads = 0; … … 182 172 size_t __default_guardsize = DEFAULT_GUARD_SIZE; 183 173 184 #ifndef __c2__185 174 static FILE *volatile dummy_file = 0; 186 175 weak_alias(dummy_file, __stdin_used); 187 176 weak_alias(dummy_file, __stdout_used); 188 177 weak_alias(dummy_file, __stderr_used); 189 #else190 extern FILE *volatile __stdin_used;191 extern FILE *volatile __stdout_used;192 extern FILE *volatile __stderr_used;193 #endif194 178 195 179 static void init_file_lock(FILE *f) … … 329 313 } 330 314 331 #ifndef __c2__332 315 weak_alias(__pthread_exit, pthread_exit); 333 316 weak_alias(__pthread_create, pthread_create); 334 #else335 _Noreturn void pthread_exit(void *result)336 {337 __pthread_exit(result);338 }339 340 int pthread_create(pthread_t *restrict res, const pthread_attr_t *restrict attrp, void *(*entry)(void *), void *restrict arg)341 {342 return __pthread_create(res, attrp, entry, arg);343 }344 #endif -
asp3_tinet_ecnl_rx/trunk/musl-1.1.18/src/thread/pthread_mutex_lock.c
r337 r400 12 12 } 13 13 14 #ifndef __c2__15 14 weak_alias(__pthread_mutex_lock, pthread_mutex_lock); 16 #else17 int pthread_mutex_lock(pthread_mutex_t *m)18 {19 return __pthread_mutex_lock(m);20 }21 #endif -
asp3_tinet_ecnl_rx/trunk/musl-1.1.18/src/thread/pthread_mutex_trylock.c
r337 r400 56 56 } 57 57 58 #ifndef __c2__59 58 weak_alias(__pthread_mutex_trylock, pthread_mutex_trylock); 60 #else61 int pthread_mutex_trylock(pthread_mutex_t *m)62 {63 return __pthread_mutex_trylock(m);64 }65 #endif -
asp3_tinet_ecnl_rx/trunk/musl-1.1.18/src/thread/pthread_mutex_unlock.c
r337 r400 35 35 } 36 36 37 #ifndef __c2__38 37 weak_alias(__pthread_mutex_unlock, pthread_mutex_unlock); 39 #else40 int pthread_mutex_unlock(pthread_mutex_t *m)41 {42 return __pthread_mutex_unlock(m);43 }44 #endif -
asp3_tinet_ecnl_rx/trunk/musl-1.1.18/src/thread/pthread_self.c
r337 r400 8 8 } 9 9 10 #ifndef __c2__11 10 weak_alias(__pthread_self_internal, pthread_self); 12 11 weak_alias(__pthread_self_internal, thrd_current); 13 #else14 pthread_t pthread_self()15 {16 return __pthread_self_internal();17 }18 19 pthread_t thrd_current()20 {21 return __pthread_self_internal();22 }23 #endif -
asp3_tinet_ecnl_rx/trunk/musl-1.1.18/src/thread/pthread_setcancelstate.c
r337 r400 10 10 } 11 11 12 #ifndef __c2__13 12 weak_alias(__pthread_setcancelstate, pthread_setcancelstate); 14 #else15 int pthread_setcancelstate(int new, int *old)16 {17 return __pthread_setcancelstate(new, old);18 }19 #endif -
asp3_tinet_ecnl_rx/trunk/musl-1.1.18/src/thread/pthread_testcancel.c
r337 r400 13 13 } 14 14 15 #ifndef __c2__16 15 weak_alias(__pthread_testcancel, pthread_testcancel); 17 #else18 void pthread_testcancel()19 {20 __pthread_testcancel();21 }22 #endif -
asp3_tinet_ecnl_rx/trunk/musl-1.1.18/src/thread/synccall.c
r337 r400 18 18 static volatile int target_tid; 19 19 static void (*callback)(void *), *context; 20 #ifndef __c2__21 20 static volatile int dummy = 0; 22 21 weak_alias(dummy, __block_new_threads); 23 #else24 extern volatile int __block_new_threads;25 #endif26 22 27 23 static void handler(int sig)
Note:
See TracChangeset
for help on using the changeset viewer.