Re: [PATCH 3/8] xfsdump: implement lock abstraction with pthreads

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> +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.

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux