Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(573)

Side by Side Diff: fusl/src/thread/pthread_setcanceltype.c

Issue 1714623002: [fusl] clang-format fusl (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: headers too Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698