Changeset 1be7bee in mainline for uspace/lib/c/include


Ignore:
Timestamp:
2019-08-07T04:20:30Z (6 years ago)
Author:
Matthieu Riolo <matthieu.riolo@…>
Children:
70d28e8
Parents:
fe86d9d
git-author:
Michal Koutný <xm.koutny+hos@…> (2015-10-05 21:17:40)
git-committer:
Matthieu Riolo <matthieu.riolo@…> (2019-08-07 04:20:30)
Message:

sysman: Move task retval and waiting logic to taskman (partially)

  • two important sessions: NS and taskman
  • depending on boot task vs spawned task those sessions are initiated differently

Conflicts:

uspace/lib/c/generic/async.c
uspace/lib/c/generic/libc.c
uspace/lib/c/generic/task.c
uspace/lib/c/include/ipc/ns.h
uspace/lib/c/include/task.h
uspace/lib/posix/source/sys/wait.c
uspace/srv/loader/main.c
uspace/srv/ns/ns.c

Location:
uspace/lib/c/include
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/ipc/ns.h

    rfe86d9d r1be7bee  
    4242        NS_REGISTER,
    4343        NS_REGISTER_BROKER,
    44         NS_TASK_WAIT,
    45         NS_ID_INTRO,
    46         NS_RETVAL
     44        NS_ID_INTRO
    4745} ns_request_t;
    4846
  • uspace/lib/c/include/ipc/taskman.h

    rfe86d9d r1be7bee  
    4040
    4141typedef enum {
    42         TASKMAN_HELLO = IPC_FIRST_USER_METHOD,
     42        TASKMAN_WAIT = IPC_FIRST_USER_METHOD,
     43        TASKMAN_RETVAL
    4344} taskman_request_t;
    4445
  • uspace/lib/c/include/loader/pcb.h

    rfe86d9d r1be7bee  
    6464        async_sess_t *session_primary;
    6565       
     66        /** Session to taskman (typically spawn parent) */
     67        async_sess_t *session_taskman;
     68       
    6669        /** Current working directory. */
    6770        char *cwd;
  • uspace/lib/c/include/task.h

    rfe86d9d r1be7bee  
    4242#include <types/task.h>
    4343
     44#define TASK_WAIT_EXIT   0x1
     45#define TASK_WAIT_RETVAL 0x2
     46
    4447typedef struct {
     48        int flags;
    4549        ipc_call_t result;
    4650        aid_t aid;
    4751} task_wait_t;
    4852
    49 struct _TASK;
    50 typedef struct _TASK task_t;
    5153
    5254extern task_id_t task_get_id(void);
     
    6365    __attribute__((sentinel));
    6466
    65 extern errno_t task_setup_wait(task_id_t, task_wait_t *);
     67// if there is possibility for further wait, modify task_wait
     68extern errno_t task_wait(task_wait_t *, task_exit_t *, int *);
     69extern errno_t task_wait_task_id(task_id_t, int, task_exit_t *, int *);
     70// similar to listen and socket duplication
     71extern errno_t task_wait_any(task_wait_t *, task_id_t *, task_exit_t *, int *,
     72    task_wait_t *);
     73
     74//extern int task_wait_any(int, task_exit_t *, int *);
     75// alternative
     76// task_wait_t is output param, actual result is obtained via task_wait call
     77//extern int task_wait_any(task_wait_t *, int);
     78
    6679extern void task_cancel_wait(task_wait_t *);
    67 extern errno_t task_wait(task_wait_t *, task_exit_t *, int *);
    68 extern errno_t task_wait_task_id(task_id_t, task_exit_t *, int *);
     80
    6981extern errno_t task_retval(int);
     82//TODO
     83//extern int task_exit(int);
    7084
    7185#endif
Note: See TracChangeset for help on using the changeset viewer.