Changeset 34dcd3f in mainline for generic/src/synch/waitq.c


Ignore:
Timestamp:
2006-06-05T07:47:45Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c778c1a
Parents:
7509ddc
Message:

Update for task_kill().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • generic/src/synch/waitq.c

    r7509ddc r34dcd3f  
    312312        spinlock_lock(&THREAD->lock);
    313313
    314         if (THREAD->interrupted) {
    315                 spinlock_unlock(&THREAD->lock);
    316                 spinlock_unlock(&wq->lock);
    317                 return ESYNCH_INTERRUPTED;
    318         }
    319 
    320314        if (flags & SYNCH_FLAGS_INTERRUPTIBLE) {
     315
     316                /*
     317                 * If the thread was already interrupted,
     318                 * don't go to sleep at all.
     319                 */
     320                if (THREAD->interrupted) {
     321                        spinlock_unlock(&THREAD->lock);
     322                        spinlock_unlock(&wq->lock);
     323                        return ESYNCH_INTERRUPTED;
     324                }
     325
    321326                /*
    322327                 * Set context that will be restored if the sleep
     
    329334                        return ESYNCH_INTERRUPTED;
    330335                }
     336
    331337        } else {
    332338                THREAD->sleep_interruptible = false;
Note: See TracChangeset for help on using the changeset viewer.