Thread (2 messages) flat view 2 messages, 2 authors, 2007-02-14

Re: [PATCH 2.6.21-rc1 4/5] ehca: replace yield() by wait_for_completion()

From: Christoph Hellwig <hch@infradead.org>
Date: 2007-02-14 22:28:31
Also in: lkml

quoted hunk ↗ jump to hunk
@@ -332,7 +333,7 @@ int ehca_destroy_cq(struct ib_cq *cq)
        spin_lock_irqsave(&ehca_cq_idr_lock, flags);
        while (my_cq->nr_callbacks) {
                spin_unlock_irqrestore(&ehca_cq_idr_lock, flags);
-               yield();
+               wait_for_completion(&my_cq->zero_callbacks);
                spin_lock_irqsave(&ehca_cq_idr_lock, flags);
        }
A while loop around wait_for_completion doesn't make all that much sense.
I suspect a simple

	if (my_cq->nr_callbacks)
		wait_for_completion(&my_cq->zero_callbacks);

Is what you need.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help