Changeset a46e56b in mainline for uspace/srv/ns/task.c


Ignore:
Timestamp:
2018-03-22T06:49:35Z (7 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
77f0a1d
Parents:
3e242d2
git-author:
Jakub Jermar <jakub@…> (2018-03-21 23:29:06)
git-committer:
Jakub Jermar <jakub@…> (2018-03-22 06:49:35)
Message:

Prefer handle over ID in naming handle variables

File:
1 edited

Legend:

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

    r3e242d2 ra46e56b  
    146146        link_t link;
    147147        task_id_t id;         /**< Task ID. */
    148         cap_call_handle_t callid;  /**< Call ID waiting for the connection */
     148        cap_call_handle_t chandle;  /**< Call ID waiting for the connection */
    149149} pending_wait_t;
    150150
     
    184184                texit = ht->have_rval ? TASK_EXIT_NORMAL :
    185185                    TASK_EXIT_UNEXPECTED;
    186                 async_answer_2(pr->callid, EOK, texit, ht->retval);
     186                async_answer_2(pr->chandle, EOK, texit, ht->retval);
    187187
    188188                list_remove(&pr->link);
     
    192192}
    193193
    194 void wait_for_task(task_id_t id, ipc_call_t *call, cap_call_handle_t callid)
     194void wait_for_task(task_id_t id, ipc_call_t *call, cap_call_handle_t chandle)
    195195{
    196196        ht_link_t *link = hash_table_find(&task_hash_table, &id);
     
    200200        if (ht == NULL) {
    201201                /* No such task exists. */
    202                 async_answer_0(callid, ENOENT);
     202                async_answer_0(chandle, ENOENT);
    203203                return;
    204204        }
     
    207207                task_exit_t texit = ht->have_rval ? TASK_EXIT_NORMAL :
    208208                    TASK_EXIT_UNEXPECTED;
    209                 async_answer_2(callid, EOK, texit, ht->retval);
     209                async_answer_2(chandle, EOK, texit, ht->retval);
    210210                return;
    211211        }
     
    215215            (pending_wait_t *) malloc(sizeof(pending_wait_t));
    216216        if (!pr) {
    217                 async_answer_0(callid, ENOMEM);
     217                async_answer_0(chandle, ENOMEM);
    218218                return;
    219219        }
     
    221221        link_initialize(&pr->link);
    222222        pr->id = id;
    223         pr->callid = callid;
     223        pr->chandle = chandle;
    224224        list_append(&pr->link, &pending_wait);
    225225}
Note: See TracChangeset for help on using the changeset viewer.