diff options
author | sjg <sjg@FreeBSD.org> | 2014-11-19 01:07:58 +0000 |
---|---|---|
committer | sjg <sjg@FreeBSD.org> | 2014-11-19 01:07:58 +0000 |
commit | b137080f19736ee33fede2e88bb54438604cf86b (patch) | |
tree | 377ac0ac449528621eb192cd245adadb5fd53668 /sbin/hastd | |
parent | ab21a29eb607d4dfe389b965fbdee27558e791aa (diff) | |
parent | 4a8d07956d121238d006d34ffe7d6269744e8b1a (diff) | |
download | FreeBSD-src-b137080f19736ee33fede2e88bb54438604cf86b.zip FreeBSD-src-b137080f19736ee33fede2e88bb54438604cf86b.tar.gz |
Merge from head@274682
Diffstat (limited to 'sbin/hastd')
-rw-r--r-- | sbin/hastd/Makefile | 2 | ||||
-rw-r--r-- | sbin/hastd/primary.c | 3 | ||||
-rw-r--r-- | sbin/hastd/synch.h | 23 |
3 files changed, 14 insertions, 14 deletions
diff --git a/sbin/hastd/Makefile b/sbin/hastd/Makefile index 306c83a..3604b5b 100644 --- a/sbin/hastd/Makefile +++ b/sbin/hastd/Makefile @@ -30,7 +30,7 @@ CFLAGS+=-DINET CFLAGS+=-DINET6 .endif -DPADD= ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} ${LIBL} ${LIBPTHREAD} ${LIBUTIL} +DPADD= ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} ${LIBPTHREAD} ${LIBUTIL} LDADD= -lgeom -lbsdxml -lsbuf -lpthread -lutil .if ${MK_OPENSSL} != "no" DPADD+= ${LIBCRYPTO} diff --git a/sbin/hastd/primary.c b/sbin/hastd/primary.c index 385a52a..8fa3383 100644 --- a/sbin/hastd/primary.c +++ b/sbin/hastd/primary.c @@ -330,9 +330,8 @@ primary_exitx(int exitcode, const char *fmt, ...) exit(exitcode); } -/* Expects res->hr_amp locked, returns unlocked. */ static int -hast_activemap_flush(struct hast_resource *res) +hast_activemap_flush(struct hast_resource *res) __unlocks(res->hr_amp_lock) { const unsigned char *buf; size_t size; diff --git a/sbin/hastd/synch.h b/sbin/hastd/synch.h index 65360fd..db4d83b 100644 --- a/sbin/hastd/synch.h +++ b/sbin/hastd/synch.h @@ -46,7 +46,7 @@ #endif static __inline void -mtx_init(pthread_mutex_t *lock) +mtx_init(pthread_mutex_t *lock) __requires_unlocked(*lock) { int error; @@ -54,7 +54,7 @@ mtx_init(pthread_mutex_t *lock) PJDLOG_ASSERT(error == 0); } static __inline void -mtx_destroy(pthread_mutex_t *lock) +mtx_destroy(pthread_mutex_t *lock) __requires_unlocked(*lock) { int error; @@ -62,7 +62,7 @@ mtx_destroy(pthread_mutex_t *lock) PJDLOG_ASSERT(error == 0); } static __inline void -mtx_lock(pthread_mutex_t *lock) +mtx_lock(pthread_mutex_t *lock) __locks_exclusive(*lock) { int error; @@ -70,7 +70,7 @@ mtx_lock(pthread_mutex_t *lock) PJDLOG_ASSERT(error == 0); } static __inline bool -mtx_trylock(pthread_mutex_t *lock) +mtx_trylock(pthread_mutex_t *lock) __trylocks_exclusive(true, *lock) { int error; @@ -79,7 +79,7 @@ mtx_trylock(pthread_mutex_t *lock) return (error == 0); } static __inline void -mtx_unlock(pthread_mutex_t *lock) +mtx_unlock(pthread_mutex_t *lock) __unlocks(*lock) { int error; @@ -94,7 +94,7 @@ mtx_owned(pthread_mutex_t *lock) } static __inline void -rw_init(pthread_rwlock_t *lock) +rw_init(pthread_rwlock_t *lock) __requires_unlocked(*lock) { int error; @@ -102,7 +102,7 @@ rw_init(pthread_rwlock_t *lock) PJDLOG_ASSERT(error == 0); } static __inline void -rw_destroy(pthread_rwlock_t *lock) +rw_destroy(pthread_rwlock_t *lock) __requires_unlocked(*lock) { int error; @@ -110,7 +110,7 @@ rw_destroy(pthread_rwlock_t *lock) PJDLOG_ASSERT(error == 0); } static __inline void -rw_rlock(pthread_rwlock_t *lock) +rw_rlock(pthread_rwlock_t *lock) __locks_shared(*lock) { int error; @@ -118,7 +118,7 @@ rw_rlock(pthread_rwlock_t *lock) PJDLOG_ASSERT(error == 0); } static __inline void -rw_wlock(pthread_rwlock_t *lock) +rw_wlock(pthread_rwlock_t *lock) __locks_exclusive(*lock) { int error; @@ -126,7 +126,7 @@ rw_wlock(pthread_rwlock_t *lock) PJDLOG_ASSERT(error == 0); } static __inline void -rw_unlock(pthread_rwlock_t *lock) +rw_unlock(pthread_rwlock_t *lock) __unlocks(*lock) { int error; @@ -150,7 +150,7 @@ cv_init(pthread_cond_t *cv) PJDLOG_ASSERT(error == 0); } static __inline void -cv_wait(pthread_cond_t *cv, pthread_mutex_t *lock) +cv_wait(pthread_cond_t *cv, pthread_mutex_t *lock) __requires_exclusive(*lock) { int error; @@ -159,6 +159,7 @@ cv_wait(pthread_cond_t *cv, pthread_mutex_t *lock) } static __inline bool cv_timedwait(pthread_cond_t *cv, pthread_mutex_t *lock, int timeout) + __requires_exclusive(*lock) { struct timespec ts; int error; |