Changeset 7f1c620 in mainline for generic/src/synch/futex.c
- Timestamp:
- 2006-07-04T17:17:56Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0ffa3ef5
- Parents:
- 991779c5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
generic/src/synch/futex.c
r991779c5 r7f1c620 59 59 static void futex_initialize(futex_t *futex); 60 60 61 static futex_t *futex_find( __addresspaddr);62 static index_t futex_ht_hash( __native*key);63 static bool futex_ht_compare( __native*key, count_t keys, link_t *item);61 static futex_t *futex_find(uintptr_t paddr); 62 static index_t futex_ht_hash(unative_t *key); 63 static bool futex_ht_compare(unative_t *key, count_t keys, link_t *item); 64 64 static void futex_ht_remove_callback(link_t *item); 65 65 … … 109 109 * If there is no physical mapping for uaddr ENOENT is returned. 110 110 */ 111 __native sys_futex_sleep_timeout(__address uaddr, __u32usec, int flags)112 { 113 futex_t *futex; 114 __addresspaddr;111 unative_t sys_futex_sleep_timeout(uintptr_t uaddr, uint32_t usec, int flags) 112 { 113 futex_t *futex; 114 uintptr_t paddr; 115 115 pte_t *t; 116 116 ipl_t ipl; … … 126 126 page_table_unlock(AS, true); 127 127 interrupts_restore(ipl); 128 return ( __native) ENOENT;128 return (unative_t) ENOENT; 129 129 } 130 130 paddr = PTE_GET_FRAME(t) + (uaddr - ALIGN_DOWN(uaddr, PAGE_SIZE)); … … 135 135 futex = futex_find(paddr); 136 136 137 return ( __native) waitq_sleep_timeout(&futex->wq, usec, flags | SYNCH_FLAGS_INTERRUPTIBLE);137 return (unative_t) waitq_sleep_timeout(&futex->wq, usec, flags | SYNCH_FLAGS_INTERRUPTIBLE); 138 138 } 139 139 … … 144 144 * @return ENOENT if there is no physical mapping for uaddr. 145 145 */ 146 __native sys_futex_wakeup(__addressuaddr)147 { 148 futex_t *futex; 149 __addresspaddr;146 unative_t sys_futex_wakeup(uintptr_t uaddr) 147 { 148 futex_t *futex; 149 uintptr_t paddr; 150 150 pte_t *t; 151 151 ipl_t ipl; … … 161 161 page_table_unlock(AS, true); 162 162 interrupts_restore(ipl); 163 return ( __native) ENOENT;163 return (unative_t) ENOENT; 164 164 } 165 165 paddr = PTE_GET_FRAME(t) + (uaddr - ALIGN_DOWN(uaddr, PAGE_SIZE)); … … 183 183 * @return Address of the kernel futex structure. 184 184 */ 185 futex_t *futex_find( __addresspaddr)185 futex_t *futex_find(uintptr_t paddr) 186 186 { 187 187 link_t *item; … … 276 276 * @return Index into futex hash table. 277 277 */ 278 index_t futex_ht_hash( __native*key)278 index_t futex_ht_hash(unative_t *key) 279 279 { 280 280 return *key & (FUTEX_HT_SIZE-1); … … 287 287 * @return True if the item matches the key. False otherwise. 288 288 */ 289 bool futex_ht_compare( __native*key, count_t keys, link_t *item)289 bool futex_ht_compare(unative_t *key, count_t keys, link_t *item) 290 290 { 291 291 futex_t *futex; … … 324 324 for (i = 0; i < node->keys; i++) { 325 325 futex_t *ftx; 326 __addresspaddr = node->key[i];326 uintptr_t paddr = node->key[i]; 327 327 328 328 ftx = (futex_t *) node->value[i];
Note:
See TracChangeset
for help on using the changeset viewer.