Changeset 387416b in mainline for kernel/generic/src/synch/futex.c
- Timestamp:
- 2009-12-12T10:11:35Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 99de22b
- Parents:
- 58d5803d (diff), 1e4cada (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/synch/futex.c
r58d5803d r387416b 90 90 /** Initialize kernel futex structure. 91 91 * 92 * @param futex 92 * @param futex Kernel futex structure. 93 93 */ 94 94 void futex_initialize(futex_t *futex) … … 102 102 /** Sleep in futex wait queue. 103 103 * 104 * @param uaddr Userspace address of the futex counter. 105 * @param usec If non-zero, number of microseconds this thread is willing to 106 * sleep. 107 * @param flags Select mode of operation. 108 * 109 * @return One of ESYNCH_TIMEOUT, ESYNCH_OK_ATOMIC and ESYNCH_OK_BLOCKED. See 110 * synch.h. If there is no physical mapping for uaddr ENOENT is returned. 111 */ 112 unative_t sys_futex_sleep_timeout(uintptr_t uaddr, uint32_t usec, int flags) 104 * @param uaddr Userspace address of the futex counter. 105 * 106 * @return If there is no physical mapping for uaddr ENOENT is 107 * returned. Otherwise returns a wait result as defined in 108 * synch.h. 109 */ 110 unative_t sys_futex_sleep(uintptr_t uaddr) 113 111 { 114 112 futex_t *futex; … … 140 138 udebug_stoppable_begin(); 141 139 #endif 142 rc = waitq_sleep_timeout(&futex->wq, usec, flags | 143 SYNCH_FLAGS_INTERRUPTIBLE); 144 140 rc = waitq_sleep_timeout(&futex->wq, 0, SYNCH_FLAGS_INTERRUPTIBLE); 145 141 #ifdef CONFIG_UDEBUG 146 142 udebug_stoppable_end(); … … 151 147 /** Wakeup one thread waiting in futex wait queue. 152 148 * 153 * @param uaddr 154 * 155 * @return 149 * @param uaddr Userspace address of the futex counter. 150 * 151 * @return ENOENT if there is no physical mapping for uaddr. 156 152 */ 157 153 unative_t sys_futex_wakeup(uintptr_t uaddr) … … 190 186 * If the structure does not exist already, a new one is created. 191 187 * 192 * @param paddr 193 * 194 * @return 188 * @param paddr Physical address of the userspace futex counter. 189 * 190 * @return Address of the kernel futex structure. 195 191 */ 196 192 futex_t *futex_find(uintptr_t paddr) … … 284 280 /** Compute hash index into futex hash table. 285 281 * 286 * @param key Address where the key (i.e. physical address of futex counter) is287 * 288 * 289 * @return 282 * @param key Address where the key (i.e. physical address of futex 283 * counter) is stored. 284 * 285 * @return Index into futex hash table. 290 286 */ 291 287 size_t futex_ht_hash(unative_t *key) … … 296 292 /** Compare futex hash table item with a key. 297 293 * 298 * @param key Address where the key (i.e. physical address of futex counter) is299 * 300 * 301 * @return 294 * @param key Address where the key (i.e. physical address of futex 295 * counter) is stored. 296 * 297 * @return True if the item matches the key. False otherwise. 302 298 */ 303 299 bool futex_ht_compare(unative_t *key, size_t keys, link_t *item) … … 313 309 /** Callback for removal items from futex hash table. 314 310 * 315 * @param item 311 * @param item Item removed from the hash table. 316 312 */ 317 313 void futex_ht_remove_callback(link_t *item)
Note:
See TracChangeset
for help on using the changeset viewer.