Changeset ba1b2194 in mainline for src/time/timeout.c
- Timestamp:
- 2005-10-16T19:49:15Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 75eacab
- Parents:
- 9cefba4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/time/timeout.c
r9cefba4 rba1b2194 53 53 54 54 55 /** Initialize empty timeout list56 * 57 * Initialize the timeout list to be empty.58 * 59 * @param t Timeout listto be initialized.55 /** Reinitialize timeout 56 * 57 * Initialize all members except the lock. 58 * 59 * @param t Timeout to be initialized. 60 60 * 61 61 */ … … 70 70 71 71 72 /** Initialize timeout list73 * 74 * Initialize the timeout list and its spinlock.75 * 76 * @param t Timeout listto be initialized.72 /** Initialize timeout 73 * 74 * Initialize all members including the lock. 75 * 76 * @param t Timeout to be initialized. 77 77 * 78 78 */ … … 84 84 85 85 86 /** Register timeout callback87 * 88 * Insert t he timeout handler f (with argument arg)89 * to t he timeout list and make it execute in86 /** Register timeout 87 * 88 * Insert timeout handler f (with argument arg) 89 * to timeout list and make it execute in 90 90 * time microseconds (or slightly more). 91 91 * 92 * @param t Timeout list.92 * @param t Timeout structure. 93 93 * @param time Number of usec in the future to execute 94 94 * the handler. … … 97 97 * 98 98 */ 99 void timeout_register(timeout_t *t, __u64 time, timeout_handler f, void *arg)99 void timeout_register(timeout_t *t, __u64 time, timeout_handler_t f, void *arg) 100 100 { 101 101 timeout_t *hlp; … … 157 157 158 158 159 /** Unregister timeout callback159 /** Unregister timeout 160 160 * 161 161 * Remove timeout from timeout list. … … 163 163 * @param t Timeout to unregister. 164 164 * 165 */ 166 int timeout_unregister(timeout_t *t) 165 * @return true on success, false on failure. 166 */ 167 bool timeout_unregister(timeout_t *t) 167 168 { 168 169 timeout_t *hlp; … … 176 177 spinlock_unlock(&t->lock); 177 178 cpu_priority_restore(pri); 178 return 0;179 return false; 179 180 } 180 181 if (!spinlock_trylock(&t->cpu->timeoutlock)) { … … 204 205 205 206 cpu_priority_restore(pri); 206 return 1;207 } 207 return true; 208 }
Note:
See TracChangeset
for help on using the changeset viewer.