Changes in / [613d644:cb1fd3e] in mainline


Ignore:
Location:
uspace
Files:
1 deleted
32 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/bdsh/exec.c

    r613d644 rcb1fd3e  
    9797{
    9898        task_id_t tid;
    99         task_wait_t twait;
    10099        task_exit_t texit;
    101100        char *tmp;
     
    122121        file_handles_p[i] = NULL;
    123122
    124         rc = task_spawnvf(&tid, &twait, tmp, (const char **) argv, file_handles_p);
     123        rc = task_spawnvf(&tid, tmp, (const char **) argv, file_handles_p);
    125124        free(tmp);
    126125
     
    131130        }
    132131       
    133         rc = task_wait(&twait, &texit, &retval);
     132        rc = task_wait(tid, &texit, &retval);
    134133        if (rc != EOK) {
    135134                printf("%s: Failed waiting for command (%s)\n", progname,
  • uspace/app/getterm/getterm.c

    r613d644 rcb1fd3e  
    165165       
    166166        task_id_t id;
    167         task_wait_t twait;
    168167       
    169         int rc = task_spawnv(&id, &twait, cmd, (const char * const *) args);
     168        int rc = task_spawnv(&id, cmd, (const char * const *) args);
    170169        if (rc != EOK) {
    171170                printf("%s: Error spawning %s (%s)\n", APP_NAME, cmd,
     
    176175        task_exit_t texit;
    177176        int retval;
    178         rc = task_wait(&twait, &texit, &retval);
     177        rc = task_wait(id, &texit, &retval);
    179178        if (rc != EOK) {
    180179                printf("%s: Error waiting for %s (%s)\n", APP_NAME, cmd,
  • uspace/app/init/init.c

    r613d644 rcb1fd3e  
    172172        va_start(ap, path);
    173173        task_id_t id;
    174         task_wait_t wait;
    175         int rc = task_spawn(&id, &wait, path, cnt, ap);
     174        int rc = task_spawn(&id, path, cnt, ap);
    176175        va_end(ap);
    177176       
     
    190189        task_exit_t texit;
    191190        int retval;
    192         rc = task_wait(&wait, &texit, &retval);
     191        rc = task_wait(id, &texit, &retval);
    193192        if (rc != EOK) {
    194193                printf("%s: Error waiting for %s (%s)\n", NAME, path,
     
    254253       
    255254        task_id_t id;
    256         task_wait_t wait;
    257         int rc = task_spawnl(&id, &wait, app, app, winreg, NULL);
     255        int rc = task_spawnl(&id, app, app, winreg, NULL);
    258256        if (rc != EOK) {
    259257                printf("%s: Error spawning %s %s (%s)\n", NAME, app,
     
    264262        task_exit_t texit;
    265263        int retval;
    266         rc = task_wait(&wait, &texit, &retval);
     264        rc = task_wait(id, &texit, &retval);
    267265        if ((rc != EOK) || (texit != TASK_EXIT_NORMAL)) {
    268266                printf("%s: Error retrieving retval from %s (%s)\n", NAME,
     
    280278                    APP_GETTERM, svc, LOCFS_MOUNT_POINT, app);
    281279               
    282                 int rc = task_spawnl(NULL, NULL, APP_GETTERM, APP_GETTERM, svc,
     280                int rc = task_spawnl(NULL, APP_GETTERM, APP_GETTERM, svc,
    283281                    LOCFS_MOUNT_POINT, "--msg", "--wait", "--", app, NULL);
    284282                if (rc != EOK)
     
    289287                    APP_GETTERM, svc, LOCFS_MOUNT_POINT, app);
    290288               
    291                 int rc = task_spawnl(NULL, NULL, APP_GETTERM, APP_GETTERM, svc,
     289                int rc = task_spawnl(NULL, APP_GETTERM, APP_GETTERM, svc,
    292290                    LOCFS_MOUNT_POINT, "--wait", "--", app, NULL);
    293291                if (rc != EOK)
  • uspace/app/redir/redir.c

    r613d644 rcb1fd3e  
    7575}
    7676
    77 static task_id_t spawn(task_wait_t *wait, int argc, char *argv[])
     77static task_id_t spawn(int argc, char *argv[])
    7878{
    7979        const char **args;
     
    9393        args[argc] = NULL;
    9494       
    95         rc = task_spawnv(&id, wait, argv[0], args);
     95        rc = task_spawnv(&id, argv[0], args);
    9696       
    9797        free(args);
     
    152152         */
    153153        setvbuf(stdout, NULL, _IOLBF, BUFSIZ);
    154 
    155         task_wait_t wait;       
    156         task_id_t id = spawn(&wait, argc - i, argv + i);
     154       
     155        task_id_t id = spawn(argc - i, argv + i);
    157156       
    158157        if (id != 0) {
    159158                task_exit_t texit;
    160159                int retval;
    161                 task_wait(&wait, &texit, &retval);
     160                task_wait(id, &texit, &retval);
    162161               
    163162                return retval;
  • uspace/app/sbi/src/os/helenos.c

    r613d644 rcb1fd3e  
    250250{
    251251        task_id_t tid;
    252         task_wait_t twait;
    253252        task_exit_t texit;
    254253        int rc, retval;
    255254
    256         rc = task_spawnv(&tid, &twait, cmd[0], (char const * const *) cmd);
     255        rc = task_spawnv(&tid, cmd[0], (char const * const *) cmd);
    257256        if (rc != EOK) {
    258257                printf("Error: Failed spawning '%s' (%s).\n", cmd[0],
     
    262261
    263262        /* XXX Handle exit status and return value. */
    264         rc = task_wait(&twait, &texit, &retval);
     263        rc = task_wait(tid, &texit, &retval);
    265264        (void) rc;
    266265
  • uspace/app/trace/trace.c

    r613d644 rcb1fd3e  
    876876                printf("Waiting for task to exit.\n");
    877877
    878                 rc = task_wait_task_id(task_id, &texit, &retval);
     878                rc = task_wait(task_id, &texit, &retval);
    879879                if (rc != EOK) {
    880880                        printf("Failed waiting for task.\n");
  • uspace/app/viewer/viewer.c

    r613d644 rcb1fd3e  
    4444#include <surface.h>
    4545#include <codec/tga.h>
    46 #include <task.h>
    4746
    4847#define NAME  "viewer"
  • uspace/app/vlaunch/vlaunch.c

    r613d644 rcb1fd3e  
    9494       
    9595        task_id_t id;
    96         task_wait_t wait;
    97         int rc = task_spawnl(&id, &wait, app, app, winreg, NULL);
     96        int rc = task_spawnl(&id, app, app, winreg, NULL);
    9897        if (rc != EOK) {
    9998                printf("%s: Error spawning %s %s (%s)\n", NAME, app,
     
    104103        task_exit_t texit;
    105104        int retval;
    106         rc = task_wait(&wait, &texit, &retval);
     105        rc = task_wait(id, &texit, &retval);
    107106        if ((rc != EOK) || (texit != TASK_EXIT_NORMAL)) {
    108107                printf("%s: Error retrieving retval from %s (%s)\n", NAME,
  • uspace/lib/c/generic/task.c

    r613d644 rcb1fd3e  
    22 * Copyright (c) 2006 Jakub Jermar
    33 * Copyright (c) 2008 Jiri Svoboda
    4  * Copyright (c) 2014 Martin Sucha
    54 * All rights reserved.
    65 *
     
    9594 *
    9695 * @param id   If not NULL, the ID of the task is stored here on success.
    97  * @param wait If not NULL, setup waiting for task's return value and store
    98  *             the information necessary for waiting here on success.
    9996 * @param path Pathname of the binary to execute.
    10097 * @param argv Command-line arguments.
     
    103100 *
    104101 */
    105 int task_spawnv(task_id_t *id, task_wait_t *wait, const char *path,
    106     const char *const args[])
     102int task_spawnv(task_id_t *id, const char *path, const char *const args[])
    107103{
    108104        /* Send default files */
     
    129125        files[3] = NULL;
    130126       
    131         return task_spawnvf(id, wait, path, args, files);
     127        return task_spawnvf(id, path, args, files);
    132128}
    133129
     
    139135 *
    140136 * @param id    If not NULL, the ID of the task is stored here on success.
    141  * @param wait  If not NULL, setup waiting for task's return value and store
    142  *              the information necessary for waiting here on success.
    143137 * @param path  Pathname of the binary to execute.
    144138 * @param argv  Command-line arguments.
     
    148142 *
    149143 */
    150 int task_spawnvf(task_id_t *id, task_wait_t *wait, const char *path,
    151     const char *const args[], int *const files[])
     144int task_spawnvf(task_id_t *id, const char *path, const char *const args[],
     145    int *const files[])
    152146{
    153147        /* Connect to a program loader. */
     
    156150                return EREFUSED;
    157151       
    158         bool wait_initialized = false;
    159        
    160152        /* Get task ID. */
    161153        task_id_t task_id;
     
    189181                goto error;
    190182       
    191         /* Setup waiting for return value if needed */
    192         if (wait) {
    193                 rc = task_setup_wait(task_id, wait);
    194                 if (rc != EOK)
    195                         goto error;
    196                 wait_initialized = true;
    197         }
    198        
    199183        /* Run it. */
    200184        rc = loader_run(ldr);
     
    209193       
    210194error:
    211         if (wait_initialized)
    212                 task_cancel_wait(wait);
    213        
    214195        /* Error exit */
    215196        loader_abort(ldr);
     
    223204 *
    224205 * @param id   If not NULL, the ID of the task is stored here on success.
    225  * @param wait If not NULL, setup waiting for task's return value and store
    226  *             the information necessary for waiting here on success.
    227206 * @param path Pathname of the binary to execute.
    228207 * @param cnt  Number of arguments.
     
    232211 *
    233212 */
    234 int task_spawn(task_id_t *task_id, task_wait_t *wait, const char *path,
    235     int cnt, va_list ap)
     213int task_spawn(task_id_t *task_id, const char *path, int cnt, va_list ap)
    236214{
    237215        /* Allocate argument list. */
     
    249227       
    250228        /* Spawn task. */
    251         int rc = task_spawnv(task_id, wait, path, arglist);
     229        int rc = task_spawnv(task_id, path, arglist);
    252230       
    253231        /* Free argument list. */
     
    262240 *
    263241 * @param id   If not NULL, the ID of the task is stored here on success.
    264  * @param wait If not NULL, setup waiting for task's return value and store
    265  *             the information necessary for waiting here on success.
    266242 * @param path Pathname of the binary to execute.
    267243 * @param ...  Command-line arguments.
     
    270246 *
    271247 */
    272 int task_spawnl(task_id_t *task_id, task_wait_t *wait, const char *path, ...)
     248int task_spawnl(task_id_t *task_id, const char *path, ...)
    273249{
    274250        /* Count the number of arguments. */
     
    286262       
    287263        va_start(ap, path);
    288         int rc = task_spawn(task_id, wait, path, cnt, ap);
     264        int rc = task_spawn(task_id, path, cnt, ap);
    289265        va_end(ap);
    290266       
     
    292268}
    293269
    294 /** Setup waiting for a task.
    295  *
    296  * If the task finishes after this call succeeds, it is guaranteed that
    297  * task_wait(wait, &texit, &retval) will return correct return value for
    298  * the task.
    299  *
    300  * @param id   ID of the task to setup waiting for.
    301  * @param wait Information necessary for the later task_wait call is stored here.
    302  *
    303  * @return EOK on success, else error code.
    304  */
    305 int task_setup_wait(task_id_t id, task_wait_t *wait)
    306 {
    307         async_exch_t *exch = async_exchange_begin(session_ns);
    308         wait->aid = async_send_2(exch, NS_TASK_WAIT, LOWER32(id), UPPER32(id),
    309             &wait->result);
    310         async_exchange_end(exch);
    311 
    312         return EOK;
    313 }
    314 
    315 /** Cancel waiting for a task.
    316  *
    317  * This can be called *instead of* task_wait if the caller is not interested
    318  * in waiting for the task anymore.
    319  *
    320  * This function cannot be called if the task_wait was already called.
    321  *
    322  * @param wait task_wait_t previously initialized by task_setup_wait.
    323  */
    324 void task_cancel_wait(task_wait_t *wait) {
    325         async_forget(wait->aid);
    326 }
    327 
    328 /** Wait for a task to finish.
    329  *
    330  * This function returns correct values even if the task finished in
    331  * between task_setup_wait and this task_wait call.
    332  *
    333  * This function cannot be called more than once with the same task_wait_t
    334  * (it can be reused, but must be reinitialized with task_setup_wait first)
    335  *
    336  * @param wait   task_wait_t previously initialized by task_setup_wait.
    337  * @param texit  Store type of task exit here.
    338  * @param retval Store return value of the task here.
    339  *
    340  * @return EOK on success, else error code.
    341  */
    342 int task_wait(task_wait_t *wait, task_exit_t *texit, int *retval)
     270int task_wait(task_id_t id, task_exit_t *texit, int *retval)
    343271{
    344272        assert(texit);
    345273        assert(retval);
    346 
    347         sysarg_t rc;
    348         async_wait_for(wait->aid, &rc);
    349 
    350         if (rc == EOK) {
    351                 *texit = IPC_GET_ARG1(wait->result);
    352                 *retval = IPC_GET_ARG2(wait->result);
    353         }
    354 
    355         return rc;
    356 }
    357 
    358 /** Wait for a task to finish by its id.
    359  *
    360  * Note that this will fail with ENOENT if the task id is not registered in ns
    361  * (e.g. if the task finished). If you are spawning a task and need to wait
    362  * for its completion, use wait parameter of the task_spawn* functions instead
    363  * to prevent a race where the task exits before you may have a chance to wait
    364  * wait for it.
    365  *
    366  * @param id ID of the task to wait for.
    367  * @param texit  Store type of task exit here.
    368  * @param retval Store return value of the task here.
    369  *
    370  * @return EOK on success, else error code.
    371  */
    372 int task_wait_task_id(task_id_t id, task_exit_t *texit, int *retval)
    373 {
    374         task_wait_t wait;
    375         int rc = task_setup_wait(id, &wait);
    376         if (rc != EOK)
    377                 return rc;
    378        
    379         return task_wait(&wait, texit, retval);
     274       
     275        async_exch_t *exch = async_exchange_begin(session_ns);
     276        sysarg_t te, rv;
     277        int rc = (int) async_req_2_2(exch, NS_TASK_WAIT, LOWER32(id),
     278            UPPER32(id), &te, &rv);
     279        async_exchange_end(exch);
     280       
     281        *texit = te;
     282        *retval = rv;
     283       
     284        return rc;
    380285}
    381286
  • uspace/lib/c/include/async.h

    r613d644 rcb1fd3e  
    4545#include <atomic.h>
    4646#include <stdbool.h>
    47 #include <abi/proc/task.h>
     47#include <task.h>
    4848#include <abi/ddi/irq.h>
    4949#include <abi/ipc/event.h>
  • uspace/lib/c/include/ipc/common.h

    r613d644 rcb1fd3e  
    3939#include <abi/ipc/ipc.h>
    4040#include <atomic.h>
    41 #include <abi/proc/task.h>
     41#include <task.h>
    4242
    4343#define IPC_FLAG_BLOCKING  0x01
  • uspace/lib/c/include/ipc/ipc.h

    r613d644 rcb1fd3e  
    4444#include <abi/ipc/methods.h>
    4545#include <abi/synch.h>
    46 #include <abi/proc/task.h>
     46#include <task.h>
    4747
    4848typedef void (*ipc_async_callback_t)(void *, int, ipc_call_t *);
  • uspace/lib/c/include/loader/loader.h

    r613d644 rcb1fd3e  
    3737#define LIBC_LOADER_H_
    3838
    39 #include <abi/proc/task.h>
     39#include <task.h>
    4040
    4141/** Forward declararion */
  • uspace/lib/c/include/task.h

    r613d644 rcb1fd3e  
    3939#include <abi/proc/task.h>
    4040#include <stdarg.h>
    41 #include <async.h>
    42 #include <types/task.h>
    4341
    44 typedef struct {
    45         ipc_call_t result;
    46         aid_t aid;
    47 } task_wait_t;
    48 
    49 struct _TASK;
    50 typedef struct _TASK task_t;
     42typedef enum {
     43        TASK_EXIT_NORMAL,
     44        TASK_EXIT_UNEXPECTED
     45} task_exit_t;
    5146
    5247extern task_id_t task_get_id(void);
     
    5449extern int task_kill(task_id_t);
    5550
    56 extern int task_spawnv(task_id_t *, task_wait_t *, const char *path,
    57     const char *const []);
    58 extern int task_spawnvf(task_id_t *, task_wait_t *, const char *path,
    59     const char *const [], int *const []);
    60 extern int task_spawn(task_id_t *, task_wait_t *, const char *path, int,
    61     va_list ap);
    62 extern int task_spawnl(task_id_t *, task_wait_t *, const char *path, ...);
     51extern int task_spawnv(task_id_t *, const char *path, const char *const []);
     52extern int task_spawnvf(task_id_t *, const char *path, const char *const [],
     53    int *const []);
     54extern int task_spawn(task_id_t *, const char *path, int, va_list ap);
     55extern int task_spawnl(task_id_t *, const char *path, ...);
    6356
    64 extern int task_setup_wait(task_id_t, task_wait_t *);
    65 extern void task_cancel_wait(task_wait_t *);
    66 extern int task_wait(task_wait_t *, task_exit_t *, int *);
    67 extern int task_wait_task_id(task_id_t, task_exit_t *, int *);
     57extern int task_wait(task_id_t id, task_exit_t *, int *);
    6858extern int task_retval(int);
    6959
  • uspace/lib/gui/terminal.c

    r613d644 rcb1fd3e  
    104104static void getterm(const char *svc, const char *app)
    105105{
    106         task_spawnl(NULL, NULL, APP_GETTERM, APP_GETTERM, svc,
    107             LOCFS_MOUNT_POINT, "--msg", "--wait", "--", app, NULL);
     106        task_spawnl(NULL, APP_GETTERM, APP_GETTERM, svc, LOCFS_MOUNT_POINT,
     107            "--msg", "--wait", "--", app, NULL);
    108108}
    109109
  • uspace/lib/hound/src/client.c

    r613d644 rcb1fd3e  
    4242#include <stdio.h>
    4343#include <libarch/types.h>
    44 #include <task.h>
    4544
    4645#include "protocol.h"
  • uspace/lib/posix/source/sys/wait.c

    r613d644 rcb1fd3e  
    100100        int retval;
    101101       
    102         int rc = task_wait_task_id((task_id_t) pid, &texit, &retval);
     102        int rc = task_wait((task_id_t) pid, &texit, &retval);
    103103       
    104104        if (rc < 0) {
  • uspace/srv/audio/hound/main.c

    r613d644 rcb1fd3e  
    4343#include <hound/server.h>
    4444#include <hound/protocol.h>
    45 #include <task.h>
    4645
    4746#include "hound.h"
  • uspace/srv/bd/sata_bd/sata_bd.c

    r613d644 rcb1fd3e  
    4545#include <loc.h>
    4646#include <macros.h>
    47 #include <task.h>
    4847
    4948#include <ahci_iface.h>
  • uspace/srv/devman/driver.c

    r613d644 rcb1fd3e  
    4040#include <str_error.h>
    4141#include <stdio.h>
    42 #include <task.h>
    4342
    4443#include "dev.h"
     
    291290        log_msg(LOG_DEFAULT, LVL_DEBUG, "start_driver(drv=\"%s\")", drv->name);
    292291       
    293         rc = task_spawnl(NULL, NULL, drv->binary_path, drv->binary_path, NULL);
     292        rc = task_spawnl(NULL, drv->binary_path, drv->binary_path, NULL);
    294293        if (rc != EOK) {
    295294                log_msg(LOG_DEFAULT, LVL_ERROR, "Spawning driver `%s' (%s) failed: %s.",
  • uspace/srv/hid/isdv4_tablet/main.c

    r613d644 rcb1fd3e  
    3636#include <ipc/mouseev.h>
    3737#include <inttypes.h>
    38 #include <task.h>
    3938
    4039#include "isdv4.h"
  • uspace/srv/hid/remcons/remcons.c

    r613d644 rcb1fd3e  
    226226       
    227227        task_id_t task;
    228         task_wait_t wait;
    229         int rc = task_spawnl(&task, &wait, APP_GETTERM, APP_GETTERM, user->service_name,
     228        int rc = task_spawnl(&task, APP_GETTERM, APP_GETTERM, user->service_name,
    230229            "/loc", "--msg", "--", APP_SHELL, NULL);
    231230        if (rc != EOK) {
     
    247246        task_exit_t task_exit;
    248247        int task_retval;
    249         task_wait(&wait, &task_exit, &task_retval);
     248        task_wait(task, &task_exit, &task_retval);
    250249        telnet_user_log(user, "%s terminated %s, exit code %d.", APP_GETTERM,
    251250            task_exit == TASK_EXIT_NORMAL ? "normally" : "unexpectedly",
  • uspace/srv/hid/rfb/main.c

    r613d644 rcb1fd3e  
    3535#include <inttypes.h>
    3636#include <io/log.h>
    37 #include <task.h>
    3837
    3938#include <abi/fb/visuals.h>
  • uspace/srv/net/ethip/ethip.c

    r613d644 rcb1fd3e  
    4444#include <stdio.h>
    4545#include <stdlib.h>
    46 #include <task.h>
    4746#include "arp.h"
    4847#include "ethip.h"
  • uspace/srv/net/inetsrv/inetsrv.c

    r613d644 rcb1fd3e  
    4646#include <stdlib.h>
    4747#include <sys/types.h>
    48 #include <task.h>
    4948#include "addrobj.h"
    5049#include "icmp.h"
  • uspace/srv/net/loopip/loopip.c

    r613d644 rcb1fd3e  
    4444#include <stdio.h>
    4545#include <stdlib.h>
    46 #include <task.h>
    4746
    4847#define NAME  "loopip"
  • uspace/srv/net/nconfsrv/nconfsrv.c

    r613d644 rcb1fd3e  
    4848#include <stdlib.h>
    4949#include <sys/types.h>
    50 #include <task.h>
    5150#include "iplink.h"
    5251#include "nconfsrv.h"
  • uspace/srv/net/slip/slip.c

    r613d644 rcb1fd3e  
    4343#include <io/log.h>
    4444#include <errno.h>
    45 #include <task.h>
    4645
    4746#define NAME            "slip"
  • uspace/srv/ns/ns.c

    r613d644 rcb1fd3e  
    6666        while (true) {
    6767                process_pending_conn();
     68                process_pending_wait();
    6869               
    6970                ipc_call_t call;
  • uspace/srv/ns/task.c

    r613d644 rcb1fd3e  
    4040#include <macros.h>
    4141#include <malloc.h>
    42 #include <types/task.h>
    4342#include "task.h"
    4443#include "ns.h"
    4544
     45
     46/* TODO:
     47 *
     48 * As there is currently no convention that each task has to be waited
     49 * for, the NS can leak memory because of the zombie tasks.
     50 *
     51 */
    4652
    4753/** Task hash table item. */
     
    189195                }
    190196               
     197                hash_table_remove(&task_hash_table, &pr->id);
    191198                list_remove(&pr->link);
    192199                free(pr);
     
    197204void wait_for_task(task_id_t id, ipc_call_t *call, ipc_callid_t callid)
    198205{
     206        sysarg_t retval;
     207        task_exit_t texit;
     208        bool remove = false;
     209       
    199210        ht_link_t *link = hash_table_find(&task_hash_table, &id);
    200211        hashed_task_t *ht = (link != NULL) ?
     
    207218        }
    208219       
    209         if (ht->finished) {
    210                 task_exit_t texit = ht->have_rval ? TASK_EXIT_NORMAL :
    211                     TASK_EXIT_UNEXPECTED;
    212                 ipc_answer_2(callid, EOK, texit, ht->retval);
     220        if (!ht->finished) {
     221                /* Add to pending list */
     222                pending_wait_t *pr =
     223                    (pending_wait_t *) malloc(sizeof(pending_wait_t));
     224                if (!pr) {
     225                        retval = ENOMEM;
     226                        goto out;
     227                }
     228               
     229                link_initialize(&pr->link);
     230                pr->id = id;
     231                pr->callid = callid;
     232                list_append(&pr->link, &pending_wait);
    213233                return;
    214234        }
    215235       
    216         /* Add to pending list */
    217         pending_wait_t *pr =
    218             (pending_wait_t *) malloc(sizeof(pending_wait_t));
    219         if (!pr) {
    220                 if (!(callid & IPC_CALLID_NOTIFICATION))
    221                         ipc_answer_0(callid, ENOMEM);
    222                 return;
    223         }
    224        
    225         link_initialize(&pr->link);
    226         pr->id = id;
    227         pr->callid = callid;
    228         list_append(&pr->link, &pending_wait);
     236        remove = true;
     237        retval = EOK;
     238       
     239out:
     240        if (!(callid & IPC_CALLID_NOTIFICATION)) {
     241                texit = ht->have_rval ? TASK_EXIT_NORMAL : TASK_EXIT_UNEXPECTED;
     242                ipc_answer_2(callid, retval, texit, ht->retval);
     243        }
     244        if (remove)
     245                hash_table_remove_item(&task_hash_table, link);
    229246}
    230247
     
    297314        ht->retval = IPC_GET_ARG1(*call);
    298315       
    299         process_pending_wait();
    300        
    301316        return EOK;
    302317}
     
    321336        ht->finished = true;
    322337       
    323         process_pending_wait();
    324         hash_table_remove(&task_hash_table, &id);
    325        
    326338        return EOK;
    327339}
  • uspace/srv/ns/task.h

    r613d644 rcb1fd3e  
    3535
    3636#include <ipc/common.h>
    37 #include <abi/proc/task.h>
     37#include <task.h>
    3838
    3939extern int task_init(void);
  • uspace/srv/taskmon/taskmon.c

    r613d644 rcb1fd3e  
    8282
    8383                printf(NAME ": Executing %s -c %s -t %s\n", fname, dump_fname, s_taskid);
    84                 rc = task_spawnl(NULL, NULL, fname, fname, "-c", dump_fname, "-t", s_taskid,
     84                rc = task_spawnl(NULL, fname, fname, "-c", dump_fname, "-t", s_taskid,
    8585                    NULL);
    8686        } else {
    8787                printf(NAME ": Executing %s -t %s\n", fname, s_taskid);
    88                 rc = task_spawnl(NULL, NULL, fname, fname, "-t", s_taskid, NULL);
     88                rc = task_spawnl(NULL, fname, fname, "-t", s_taskid, NULL);
    8989        }
    9090
Note: See TracChangeset for help on using the changeset viewer.