Changeset 47e0a05b in mainline for uspace/srv/loader/main.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/srv/loader/main.c

    r2c57ee14 r47e0a05b  
    7878static char *arg_buf = NULL;
    7979
     80static int loader_get_taskid(ipc_callid_t rid, ipc_call_t *request)
     81{
     82        ipc_callid_t callid;
     83        task_id_t task_id;
     84        size_t len;
     85
     86        task_id = task_get_id();
     87
     88        if (!ipc_data_read_receive(&callid, &len)) {
     89                ipc_answer_0(callid, EINVAL);
     90                ipc_answer_0(rid, EINVAL);
     91                return;
     92        }
     93
     94        if (len > sizeof(task_id)) len = sizeof(task_id);
     95
     96        ipc_data_write_finalize(callid, &task_id, len);
     97        ipc_answer_0(rid, EOK);
     98}
     99
     100
    80101/** Receive a call setting pathname of the program to execute.
    81102 *
     
    275296//                      call.in_phone_hash, IPC_GET_METHOD(call));
    276297                switch (IPC_GET_METHOD(call)) {
     298                case LOADER_GET_TASKID:
     299                        loader_get_taskid(callid, &call);
     300                        continue;
    277301                case LOADER_SET_PATHNAME:
    278302                        loader_set_pathname(callid, &call);
Note: See TracChangeset for help on using the changeset viewer.