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