summaryrefslogtreecommitdiffstats
path: root/lib/libstdthreads
diff options
context:
space:
mode:
authorsjg <sjg@FreeBSD.org>2014-11-19 01:07:58 +0000
committersjg <sjg@FreeBSD.org>2014-11-19 01:07:58 +0000
commitb137080f19736ee33fede2e88bb54438604cf86b (patch)
tree377ac0ac449528621eb192cd245adadb5fd53668 /lib/libstdthreads
parentab21a29eb607d4dfe389b965fbdee27558e791aa (diff)
parent4a8d07956d121238d006d34ffe7d6269744e8b1a (diff)
downloadFreeBSD-src-b137080f19736ee33fede2e88bb54438604cf86b.zip
FreeBSD-src-b137080f19736ee33fede2e88bb54438604cf86b.tar.gz
Merge from head@274682
Diffstat (limited to 'lib/libstdthreads')
-rw-r--r--lib/libstdthreads/threads.h27
1 files changed, 18 insertions, 9 deletions
diff --git a/lib/libstdthreads/threads.h b/lib/libstdthreads/threads.h
index aba9ca1..6f322a5 100644
--- a/lib/libstdthreads/threads.h
+++ b/lib/libstdthreads/threads.h
@@ -79,15 +79,24 @@ int cnd_broadcast(cnd_t *);
void cnd_destroy(cnd_t *);
int cnd_init(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 *);
-void mtx_destroy(mtx_t *);
-int mtx_init(mtx_t *, int);
-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_timedwait(cnd_t *__restrict, mtx_t *__restrict __mtx,
+ const struct timespec *__restrict)
+ __requires_exclusive(*__mtx);
+int cnd_wait(cnd_t *, mtx_t *__mtx)
+ __requires_exclusive(*__mtx);
+void mtx_destroy(mtx_t *__mtx)
+ __requires_unlocked(*__mtx);
+int mtx_init(mtx_t *__mtx, int)
+ __requires_unlocked(*__mtx);
+int mtx_lock(mtx_t *__mtx)
+ __locks_exclusive(*__mtx);
+int mtx_timedlock(mtx_t *__restrict __mtx,
+ const struct timespec *__restrict)
+ __trylocks_exclusive(thrd_success, *__mtx);
+int mtx_trylock(mtx_t *__mtx)
+ __trylocks_exclusive(thrd_success, *__mtx);
+int mtx_unlock(mtx_t *__mtx)
+ __unlocks(*__mtx);
int thrd_create(thrd_t *, thrd_start_t, void *);
thrd_t thrd_current(void);
int thrd_detach(thrd_t);
OpenPOWER on IntegriCloud