Changeset 7f1c620 in mainline for generic/src/synch/futex.c


Ignore:
Timestamp:
2006-07-04T17:17:56Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0ffa3ef5
Parents:
991779c5
Message:

Replace old u?? types with respective C99 variants (e.g. uint32_t, int64_t, uintptr_t etc.).

File:
1 edited

Legend:

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

    r991779c5 r7f1c620  
    5959static void futex_initialize(futex_t *futex);
    6060
    61 static futex_t *futex_find(__address paddr);
    62 static index_t futex_ht_hash(__native *key);
    63 static bool futex_ht_compare(__native *key, count_t keys, link_t *item);
     61static futex_t *futex_find(uintptr_t paddr);
     62static index_t futex_ht_hash(unative_t *key);
     63static bool futex_ht_compare(unative_t *key, count_t keys, link_t *item);
    6464static void futex_ht_remove_callback(link_t *item);
    6565
     
    109109 *         If there is no physical mapping for uaddr ENOENT is returned.
    110110 */
    111 __native sys_futex_sleep_timeout(__address uaddr, __u32 usec, int flags)
    112 {
    113         futex_t *futex;
    114         __address paddr;
     111unative_t sys_futex_sleep_timeout(uintptr_t uaddr, uint32_t usec, int flags)
     112{
     113        futex_t *futex;
     114        uintptr_t paddr;
    115115        pte_t *t;
    116116        ipl_t ipl;
     
    126126                page_table_unlock(AS, true);
    127127                interrupts_restore(ipl);
    128                 return (__native) ENOENT;
     128                return (unative_t) ENOENT;
    129129        }
    130130        paddr = PTE_GET_FRAME(t) + (uaddr - ALIGN_DOWN(uaddr, PAGE_SIZE));
     
    135135        futex = futex_find(paddr);
    136136       
    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);
    138138}
    139139
     
    144144 * @return ENOENT if there is no physical mapping for uaddr.
    145145 */
    146 __native sys_futex_wakeup(__address uaddr)
    147 {
    148         futex_t *futex;
    149         __address paddr;
     146unative_t sys_futex_wakeup(uintptr_t uaddr)
     147{
     148        futex_t *futex;
     149        uintptr_t paddr;
    150150        pte_t *t;
    151151        ipl_t ipl;
     
    161161                page_table_unlock(AS, true);
    162162                interrupts_restore(ipl);
    163                 return (__native) ENOENT;
     163                return (unative_t) ENOENT;
    164164        }
    165165        paddr = PTE_GET_FRAME(t) + (uaddr - ALIGN_DOWN(uaddr, PAGE_SIZE));
     
    183183 * @return Address of the kernel futex structure.
    184184 */
    185 futex_t *futex_find(__address paddr)
     185futex_t *futex_find(uintptr_t paddr)
    186186{
    187187        link_t *item;
     
    276276 * @return Index into futex hash table.
    277277 */
    278 index_t futex_ht_hash(__native *key)
     278index_t futex_ht_hash(unative_t *key)
    279279{
    280280        return *key & (FUTEX_HT_SIZE-1);
     
    287287 * @return True if the item matches the key. False otherwise.
    288288 */
    289 bool futex_ht_compare(__native *key, count_t keys, link_t *item)
     289bool futex_ht_compare(unative_t *key, count_t keys, link_t *item)
    290290{
    291291        futex_t *futex;
     
    324324                for (i = 0; i < node->keys; i++) {
    325325                        futex_t *ftx;
    326                         __address paddr = node->key[i];
     326                        uintptr_t paddr = node->key[i];
    327327                       
    328328                        ftx = (futex_t *) node->value[i];
Note: See TracChangeset for help on using the changeset viewer.