[PATCH 3/8] xfsdump: implement lock abstraction with pthreads
Christoph Hellwig
hch at infradead.org
Thu Nov 3 02:10:54 CDT 2011
> +struct qsem {
> + ix_t qs_count;
> + /* current count of this semaphore
> + */
> + ix_t qs_waiters;
> + /* number of threads waiting on semaphore
> + */
> + pthread_mutex_t qs_mutex;
> + pthread_cond_t qs_cond;
> +};
> +typedef struct qsem qsem_t;
Can't you use Posix Semaphores directly?
See http://www.csc.villanova.edu/~mdamian/threads/posixsem.html for
a quick introduction.
More information about the xfs
mailing list