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

Side by Side Diff: fusl/src/thread/thrd_create.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 #include <threads.h> 2 #include <threads.h>
3 3
4 int __pthread_create(pthread_t *restrict, const pthread_attr_t *restrict, void * (*)(void *), void *restrict); 4 int __pthread_create(pthread_t* restrict,
5 const pthread_attr_t* restrict,
6 void* (*)(void*),
7 void* restrict);
5 8
6 int thrd_create(thrd_t *thr, thrd_start_t func, void *arg) 9 int thrd_create(thrd_t* thr, thrd_start_t func, void* arg) {
7 { 10 int ret =
8 » int ret = __pthread_create(thr, __ATTRP_C11_THREAD, (void *(*)(void *))f unc, arg); 11 __pthread_create(thr, __ATTRP_C11_THREAD, (void* (*)(void*))func, arg);
9 » switch (ret) { 12 switch (ret) {
10 » case 0: return thrd_success; 13 case 0:
11 » case EAGAIN: return thrd_nomem; 14 return thrd_success;
12 » default: return thrd_error; 15 case EAGAIN:
13 » } 16 return thrd_nomem;
17 default:
18 return thrd_error;
19 }
14 } 20 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698