Changeset 012dd8e in mainline for uspace/lib/c/include


Ignore:
Timestamp:
2019-08-07T09:15:30Z (6 years ago)
Author:
Matthieu Riolo <matthieu.riolo@…>
Children:
e8747bd8
Parents:
780c8ce
git-author:
Michal Koutný <xm.koutny+hos@…> (2015-11-01 00:08:04)
git-committer:
Matthieu Riolo <matthieu.riolo@…> (2019-08-07 09:15:30)
Message:

taskman: Handle INIT_TASKS as tasks spawned by loader

  • everyone is connected to its spawner, except for INIT_TASKS, they are connected to taskman (first binary)
  • taskman is now aware even of INIT_TASKS and taskman itself
  • refactored taskman handshake — NS session is created lazily
  • refactored async.c with usage of create_session
  • changed EINVAL to EINTR on lost waits
  • removed TODOs from taskman and related libc TODOs

Conflicts:

abi/include/abi/ipc/methods.h
boot/Makefile.common
uspace/lib/c/generic/async.c
uspace/lib/c/generic/libc.c
uspace/lib/c/generic/loader.c
uspace/lib/c/generic/ns.c
uspace/lib/c/generic/private/async.h
uspace/lib/c/generic/private/taskman.h
uspace/lib/c/generic/task.c
uspace/lib/c/include/async.h
uspace/lib/c/include/task.h
uspace/srv/loader/main.c
uspace/srv/ns/ns.c

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

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/async.h

    r780c8ce r012dd8e  
    276276extern sysarg_t async_get_label(void);
    277277
    278 extern async_sess_t *async_session_primary_swap(async_sess_t *);
    279278extern async_sess_t *async_connect_me_to(async_exch_t *, iface_t, sysarg_t,
    280279    sysarg_t);
  • uspace/lib/c/include/ipc/common.h

    r780c8ce r012dd8e  
    3939#include <abi/ipc/ipc.h>
    4040
     41/* Well known phone descriptors */
     42#define PHONE_INITIAL  0
     43
    4144#define IPC_FLAG_BLOCKING   0x01
    4245// TODO autostart flag may be united with blocking, this should be later made
  • uspace/lib/c/include/ipc/services.h

    r780c8ce r012dd8e  
    4646        SERVICE_LOC        = FOURCC('l', 'o', 'c', ' '),
    4747        SERVICE_SYSMAN     = FOURCC('s', 'y', 's', 'm'),
    48         SERVICE_TASKMAN    = FOURCC('t', 's', 'k', 'm'),
    4948        SERVICE_LOGGER     = FOURCC('l', 'o', 'g', 'g'),
    5049        SERVICE_DEVMAN     = FOURCC('d', 'e', 'v', 'n'),
  • uspace/lib/c/include/ipc/taskman.h

    r780c8ce r012dd8e  
    4242        TASKMAN_WAIT = IPC_FIRST_USER_METHOD,
    4343        TASKMAN_RETVAL,
    44         TASKMAN_EVENT_CALLBACK
     44        TASKMAN_EVENT_CALLBACK,
     45        TASKMAN_NEW_TASK,
     46        TASKMAN_I_AM_NS
    4547} taskman_request_t;
    4648
     
    5052
    5153typedef enum {
    52         TASKMAN_CONNECT_TO_LOADER = 0,
    53         TASKMAN_LOADER_TO_NS,
    54         TASKMAN_LOADER_CALLBACK,
    55         TASKMAN_CONTROL
    56 } taskman_interface_t;
     54        TASKMAN_CONNECT_TO_NS = 0,
     55        TASKMAN_CONNECT_TO_LOADER,
     56        TASKMAN_LOADER_CALLBACK
     57} taskman_connect_t;
    5758
    5859#endif
  • uspace/lib/c/include/loader/pcb.h

    r780c8ce r012dd8e  
    6161        entry_point_t entry;
    6262
    63         /** Primary session to broker. */
    64         async_sess_t *session_primary;
    65        
    6663        /** Session to taskman (typically spawn parent) */
    6764        async_sess_t *session_taskman;
  • uspace/lib/c/include/ns.h

    r780c8ce r012dd8e  
    4949extern async_sess_t *ns_session_get(void);
    5050
     51extern async_sess_t *ns_get_session(void);
     52
    5153#endif
    5254
  • uspace/lib/c/include/task.h

    r780c8ce r012dd8e  
    7676extern errno_t task_retval(int);
    7777
    78 /* Implemented in task_event.h */
     78/* Implemented in task_event.c */
    7979extern int task_register_event_handler(task_event_handler_t);
    8080
  • uspace/lib/c/include/taskman.h

    r780c8ce r012dd8e  
    3636#define LIBC_TASKMAN_H_
    3737
     38#ifndef TASKMAN_DISABLE_ASYNC
    3839#include <async.h>
     40#endif
    3941
    40 extern async_sess_t *taskman_handshake(void);
     42/* Internal functions to be used by loader only */
     43#ifndef TASKMAN_DISABLE_ASYNC
     44extern async_sess_t *taskman_get_session(void);
     45#endif
     46extern int taskman_intro_loader(void);
     47
     48/* Internal functions to be used by NS only */
     49extern int taskman_intro_ns(void);
    4150
    4251#endif
Note: See TracChangeset for help on using the changeset viewer.