Changeset c0bc189 in mainline for generic/src/synch/condvar.c
- Timestamp:
- 2006-05-19T11:55:55Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7633b109
- Parents:
- 35f3b8c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
generic/src/synch/condvar.c
r35f3b8c rc0bc189 36 36 #include <synch/waitq.h> 37 37 #include <synch/synch.h> 38 #include <arch.h> 39 #include <typedefs.h> 38 40 39 /** Initialize condition variable 40 * 41 * Initialize condition variable. 41 /** Initialize condition variable. 42 42 * 43 43 * @param cv Condition variable. … … 48 48 } 49 49 50 /** Signal the condition has become true 51 * 50 /** 52 51 * Signal the condition has become true 53 52 * to the first waiting thread by waking it up. … … 60 59 } 61 60 62 /** Signal the condition has become true 63 * 61 /** 64 62 * Signal the condition has become true 65 63 * to all waiting threads by waking them up. … … 72 70 } 73 71 74 /** Wait for the condition becoming true 75 * 76 * Wait for the condition becoming true. 72 /** Wait for the condition becoming true. 77 73 * 78 74 * @param cv Condition variable. … … 89 85 { 90 86 int rc; 87 ipl_t ipl; 91 88 89 ipl = waitq_sleep_prepare(&cv->wq); 92 90 mutex_unlock(mtx); 93 rc = waitq_sleep_timeout(&cv->wq, usec, trywait); 91 92 rc = waitq_sleep_timeout_unsafe(&cv->wq, usec, trywait); 93 94 94 mutex_lock(mtx); 95 waitq_sleep_finish(&cv->wq, rc, ipl); 96 95 97 return rc; 96 98 }
Note:
See TracChangeset
for help on using the changeset viewer.