[lttng-dev] [PATCH] wfcqueue: Fix lock and unlock functions

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Thu Nov 15 22:08:19 EST 2012


* Paul E. McKenney (paulmck at linux.vnet.ibm.com) wrote:
> The current implementation of cds_wfcq_dequeue_lock() and
> cds_wfcq_dequeue_unlock() entails mutually assured recursion.
> Redirect to _cds_wfcq_dequeue_lock() and _cds_wfcq_dequeue_unlock(),
> respectively.
> 
> Signed-off-by: Paul E. McKenney <paulmck at linux.vnet.ibm.com>

Good catch !!

Merged, thanks!

Mathieu

> 
> diff --git a/wfcqueue.c b/wfcqueue.c
> index 3474ee0..90b810e 100644
> --- a/wfcqueue.c
> +++ b/wfcqueue.c
> @@ -57,13 +57,13 @@ void cds_wfcq_enqueue(struct cds_wfcq_head *head,
>  void cds_wfcq_dequeue_lock(struct cds_wfcq_head *head,
>  		struct cds_wfcq_tail *tail)
>  {
> -	cds_wfcq_dequeue_lock(head, tail);
> +	_cds_wfcq_dequeue_lock(head, tail);
>  }
>  
>  void cds_wfcq_dequeue_unlock(struct cds_wfcq_head *head,
>  		struct cds_wfcq_tail *tail)
>  {
> -	cds_wfcq_dequeue_unlock(head, tail);
> +	_cds_wfcq_dequeue_unlock(head, tail);
>  }
>  
>  struct cds_wfcq_node *cds_wfcq_dequeue_blocking(
> 

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com



More information about the lttng-dev mailing list