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


Ignore:
Timestamp:
2018-01-04T20:50:52Z (8 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Children:
e211ea04
Parents:
facacc71
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-01-04 20:47:53)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-01-04 20:50:52)
Message:

Use errno_t in all uspace and kernel code.

Change type of every variable, parameter and return value that holds an
<errno.h> constant to either errno_t (the usual case), or sys_errno_t
(some places in kernel). This is for the purpose of self-documentation,
as well as for type-checking with a bit of type definition hackery.

After this commit, HelenOS is free of code that mixes error codes with non-error
values on the assumption that error codes are negative.

File:
1 edited

Legend:

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

    rfacacc71 r46577995  
    151151static list_t pending_wait;
    152152
    153 int task_init(void)
     153errno_t task_init(void)
    154154{
    155155        if (!hash_table_create(&task_hash_table, 0, 0, &task_hash_table_ops)) {
     
    225225}
    226226
    227 int ns_task_id_intro(ipc_call_t *call)
     227errno_t ns_task_id_intro(ipc_call_t *call)
    228228{
    229229        task_id_t id = MERGE_LOUP32(IPC_GET_ARG1(*call), IPC_GET_ARG2(*call));
     
    264264}
    265265
    266 static int get_id_by_phone(sysarg_t phone_hash, task_id_t *id)
     266static errno_t get_id_by_phone(sysarg_t phone_hash, task_id_t *id)
    267267{
    268268        ht_link_t *link = hash_table_find(&phone_to_id, &phone_hash);
     
    276276}
    277277
    278 int ns_task_retval(ipc_call_t *call)
     278errno_t ns_task_retval(ipc_call_t *call)
    279279{
    280280        task_id_t id = call->in_task_id;
     
    296296}
    297297
    298 int ns_task_disconnect(ipc_call_t *call)
     298errno_t ns_task_disconnect(ipc_call_t *call)
    299299{
    300300        task_id_t id;
    301         int rc = get_id_by_phone(call->in_phone_hash, &id);
     301        errno_t rc = get_id_by_phone(call->in_phone_hash, &id);
    302302        if (rc != EOK)
    303303                return rc;
Note: See TracChangeset for help on using the changeset viewer.