OLD | NEW |
1 #include "pthread_impl.h" | 1 #include "pthread_impl.h" |
2 | 2 |
3 int __pthread_setcancelstate(int new, int *old) | 3 int __pthread_setcancelstate(int new, int* old) { |
4 { | 4 if (new > 2U) |
5 » if (new > 2U) return EINVAL; | 5 return EINVAL; |
6 » struct pthread *self = __pthread_self(); | 6 struct pthread* self = __pthread_self(); |
7 » if (old) *old = self->canceldisable; | 7 if (old) |
8 » self->canceldisable = new; | 8 *old = self->canceldisable; |
9 » return 0; | 9 self->canceldisable = new; |
| 10 return 0; |
10 } | 11 } |
11 | 12 |
12 weak_alias(__pthread_setcancelstate, pthread_setcancelstate); | 13 weak_alias(__pthread_setcancelstate, pthread_setcancelstate); |
OLD | NEW |