OLD | NEW |
1 #include "pthread_impl.h" | 1 #include "pthread_impl.h" |
2 | 2 |
3 int pthread_setspecific(pthread_key_t k, const void *x) | 3 int pthread_setspecific(pthread_key_t k, const void* x) { |
4 { | 4 struct pthread* self = __pthread_self(); |
5 » struct pthread *self = __pthread_self(); | 5 /* Avoid unnecessary COW */ |
6 » /* Avoid unnecessary COW */ | 6 if (self->tsd[k] != x) { |
7 » if (self->tsd[k] != x) { | 7 self->tsd[k] = (void*)x; |
8 » » self->tsd[k] = (void *)x; | 8 self->tsd_used = 1; |
9 » » self->tsd_used = 1; | 9 } |
10 » } | 10 return 0; |
11 » return 0; | |
12 } | 11 } |
OLD | NEW |