Changeset 47e0a05b in mainline for uspace/lib/libc/generic/task.c


Ignore:
Timestamp:
2008-09-18T09:05:31Z (16 years ago)
Author:
Jiri Svoboda <jirik.svoboda@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4e5aa02
Parents:
2c57ee14
Message:

Allow trace to run programs and trace them (no more task IDs)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/libc/generic/task.c

    r2c57ee14 r47e0a05b  
    134134        char *pa;
    135135        size_t pa_len;
     136        task_id_t task_id;
    136137
    137138        pa = absolutize(path, &pa_len);
     
    152153                return 0;
    153154
     155        /* Get task ID. */
     156        req = async_send_0(phone_id, LOADER_GET_TASKID, &answer);
     157        rc = ipc_data_read_start(phone_id, &task_id, sizeof(task_id));
     158        if (rc != EOK) {
     159                async_wait_for(req, NULL);
     160                goto error;
     161        }
     162
     163        async_wait_for(req, &retval);
     164        if (retval != EOK)
     165                goto error;
     166
    154167        /* Send program pathname */
    155168        req = async_send_0(phone_id, LOADER_SET_PATHNAME, &answer);
     
    176189        /* Success */
    177190        ipc_hangup(phone_id);
    178         return 1;
     191        return task_id;
    179192
    180193        /* Error exit */
Note: See TracChangeset for help on using the changeset viewer.