Subversion Repositories HelenOS-historic

Rev

Rev 1156 | Rev 1229 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1156 Rev 1158
Line 71... Line 71...
71
    thread_t *t = (thread_t *) data;
71
    thread_t *t = (thread_t *) data;
72
    waitq_t *wq;
72
    waitq_t *wq;
73
    bool do_wakeup = false;
73
    bool do_wakeup = false;
74
 
74
 
75
    spinlock_lock(&threads_lock);
75
    spinlock_lock(&threads_lock);
76
    if (!list_member(&t->threads_link, &threads_head))
76
    if (!thread_exists(t))
77
        goto out;
77
        goto out;
78
 
78
 
79
grab_locks:
79
grab_locks:
80
    spinlock_lock(&t->lock);
80
    spinlock_lock(&t->lock);
81
    if ((wq = t->sleep_queue)) {        /* assignment */
81
    if ((wq = t->sleep_queue)) {        /* assignment */
Line 115... Line 115...
115
    bool do_wakeup = false;
115
    bool do_wakeup = false;
116
    ipl_t ipl;
116
    ipl_t ipl;
117
 
117
 
118
    ipl = interrupts_disable();
118
    ipl = interrupts_disable();
119
    spinlock_lock(&threads_lock);
119
    spinlock_lock(&threads_lock);
120
    if (!list_member(&t->threads_link, &threads_head))
120
    if (!thread_exists(t))
121
        goto out;
121
        goto out;
122
 
122
 
123
grab_locks:
123
grab_locks:
124
    spinlock_lock(&t->lock);
124
    spinlock_lock(&t->lock);
125
    if ((wq = t->sleep_queue)) {        /* assignment */
125
    if ((wq = t->sleep_queue)) {        /* assignment */