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

Unified Diff: fusl/include/threads.h

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 side-by-side diff with in-line comments
Download patch
Index: fusl/include/threads.h
diff --git a/fusl/include/threads.h b/fusl/include/threads.h
index 017948261e9f8818340c7fc789c6a4d9aff93d3c..0ea5ff63b9708ef8a8c97e471bce05568eb5ad13 100644
--- a/fusl/include/threads.h
+++ b/fusl/include/threads.h
@@ -8,14 +8,14 @@
extern "C" {
typedef unsigned long thrd_t;
#else
-typedef struct __pthread *thrd_t;
+typedef struct __pthread* thrd_t;
#define thread_local _Thread_local
#endif
typedef int once_flag;
typedef unsigned tss_t;
-typedef int (*thrd_start_t)(void *);
-typedef void (*tss_dtor_t)(void *);
+typedef int (*thrd_start_t)(void*);
+typedef void (*tss_dtor_t)(void*);
#define __NEED_cnd_t
#define __NEED_mtx_t
@@ -25,28 +25,28 @@ typedef void (*tss_dtor_t)(void *);
#define TSS_DTOR_ITERATIONS 4
enum {
- thrd_success = 0,
- thrd_busy = 1,
- thrd_error = 2,
- thrd_nomem = 3,
- thrd_timedout = 4,
+ thrd_success = 0,
+ thrd_busy = 1,
+ thrd_error = 2,
+ thrd_nomem = 3,
+ thrd_timedout = 4,
};
enum {
- mtx_plain = 0,
- mtx_recursive = 1,
- mtx_timed = 2,
+ mtx_plain = 0,
+ mtx_recursive = 1,
+ mtx_timed = 2,
};
#define ONCE_FLAG_INIT 0
-int thrd_create(thrd_t *, thrd_start_t, void *);
+int thrd_create(thrd_t*, thrd_start_t, void*);
_Noreturn void thrd_exit(int);
int thrd_detach(thrd_t);
-int thrd_join(thrd_t, int *);
+int thrd_join(thrd_t, int*);
-int thrd_sleep(const struct timespec *, struct timespec *);
+int thrd_sleep(const struct timespec*, struct timespec*);
void thrd_yield(void);
thrd_t thrd_current(void);
@@ -55,30 +55,32 @@ int thrd_equal(thrd_t, thrd_t);
#define thrd_equal(A, B) ((A) == (B))
#endif
-void call_once(once_flag *, void (*)(void));
+void call_once(once_flag*, void (*)(void));
-int mtx_init(mtx_t *, int);
-void mtx_destroy(mtx_t *);
+int mtx_init(mtx_t*, int);
+void mtx_destroy(mtx_t*);
-int mtx_lock(mtx_t *);
-int mtx_timedlock(mtx_t *__restrict, const struct timespec *__restrict);
-int mtx_trylock(mtx_t *);
-int mtx_unlock(mtx_t *);
+int mtx_lock(mtx_t*);
+int mtx_timedlock(mtx_t* __restrict, const struct timespec* __restrict);
+int mtx_trylock(mtx_t*);
+int mtx_unlock(mtx_t*);
-int cnd_init(cnd_t *);
-void cnd_destroy(cnd_t *);
+int cnd_init(cnd_t*);
+void cnd_destroy(cnd_t*);
-int cnd_broadcast(cnd_t *);
-int cnd_signal(cnd_t *);
+int cnd_broadcast(cnd_t*);
+int cnd_signal(cnd_t*);
-int cnd_timedwait(cnd_t *__restrict, mtx_t *__restrict, const struct timespec *__restrict);
-int cnd_wait(cnd_t *, mtx_t *);
+int cnd_timedwait(cnd_t* __restrict,
+ mtx_t* __restrict,
+ const struct timespec* __restrict);
+int cnd_wait(cnd_t*, mtx_t*);
-int tss_create(tss_t *, tss_dtor_t);
+int tss_create(tss_t*, tss_dtor_t);
void tss_delete(tss_t key);
-int tss_set(tss_t, void *);
-void *tss_get(tss_t);
+int tss_set(tss_t, void*);
+void* tss_get(tss_t);
#ifdef __cplusplus
}

Powered by Google App Engine
This is Rietveld 408576698