Rev 557 | Rev 788 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 557 | Rev 615 | ||
---|---|---|---|
Line 74... | Line 74... | ||
74 | if (!list_member(&t->threads_link, &threads_head)) |
74 | if (!list_member(&t->threads_link, &threads_head)) |
75 | goto out; |
75 | goto out; |
76 | 76 | ||
77 | grab_locks: |
77 | grab_locks: |
78 | spinlock_lock(&t->lock); |
78 | spinlock_lock(&t->lock); |
79 | if (wq = t->sleep_queue) { /* assignment */ |
79 | if ((wq = t->sleep_queue)) { /* assignment */ |
80 | if (!spinlock_trylock(&wq->lock)) { |
80 | if (!spinlock_trylock(&wq->lock)) { |
81 | spinlock_unlock(&t->lock); |
81 | spinlock_unlock(&t->lock); |
82 | goto grab_locks; /* avoid deadlock */ |
82 | goto grab_locks; /* avoid deadlock */ |
83 | } |
83 | } |
84 | 84 |