Changes in uspace/srv/ns/task.c [6769005:5e801dc] in mainline


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/ns/task.c

    r6769005 r5e801dc  
    5454} hashed_task_t;
    5555
    56 static size_t task_key_hash(void *key)
    57 {
    58         return *(task_id_t *)key;
    59 }
    60 
    61 static size_t task_hash(const ht_link_t  *item)
     56static size_t task_key_hash(const void *key)
     57{
     58        const task_id_t *tid = key;
     59        return *tid;
     60}
     61
     62static size_t task_hash(const ht_link_t *item)
    6263{
    6364        hashed_task_t *ht = hash_table_get_inst(item, hashed_task_t, link);
     
    6566}
    6667
    67 static bool task_key_equal(void *key, const ht_link_t *item)
    68 {
     68static bool task_key_equal(const void *key, const ht_link_t *item)
     69{
     70        const task_id_t *tid = key;
    6971        hashed_task_t *ht = hash_table_get_inst(item, hashed_task_t, link);
    70         return ht->id == *(task_id_t *)key;
     72        return ht->id == *tid;
    7173}
    7274
     
    9799/* label-to-id hash table operations */
    98100
    99 static size_t p2i_key_hash(void *key)
    100 {
    101         sysarg_t label = *(sysarg_t *)key;
    102         return label;
     101static size_t p2i_key_hash(const void *key)
     102{
     103        const sysarg_t *label = key;
     104        return *label;
    103105}
    104106
     
    109111}
    110112
    111 static bool p2i_key_equal(void *key, const ht_link_t *item)
    112 {
    113         sysarg_t label = *(sysarg_t *)key;
     113static bool p2i_key_equal(const void *key, const ht_link_t *item)
     114{
     115        const sysarg_t *label = key;
    114116        p2i_entry_t *entry = hash_table_get_inst(item, p2i_entry_t, link);
    115117
    116         return (label == entry->label);
     118        return (*label == entry->label);
    117119}
    118120
     
    225227errno_t ns_task_id_intro(ipc_call_t *call)
    226228{
    227         task_id_t id = MERGE_LOUP32(IPC_GET_ARG1(*call), IPC_GET_ARG2(*call));
     229        task_id_t id = MERGE_LOUP32(ipc_get_arg1(call), ipc_get_arg2(call));
    228230
    229231        ht_link_t *link = hash_table_find(&phone_to_id, &call->request_label);
     
    289291        ht->finished = true;
    290292        ht->have_rval = true;
    291         ht->retval = IPC_GET_ARG1(*call);
     293        ht->retval = ipc_get_arg1(call);
    292294
    293295        process_pending_wait();
Note: See TracChangeset for help on using the changeset viewer.