Changeset 1be7bee in mainline for uspace/srv/loader/main.c


Ignore:
Timestamp:
2019-08-07T04:20:30Z (5 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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/loader/main.c

    rfe86d9d r1be7bee  
    8484static async_sess_t *session_primary = NULL;
    8585
     86/** Session to taskman (typically our spawner) */
     87static async_sess_t *session_taskman = NULL;
     88
    8689/** Current working directory */
    8790static char *cwd = NULL;
     
    335338
    336339        pcb.session_primary = session_primary;
     340        pcb.session_taskman = session_taskman;
    337341
    338342        pcb.cwd = cwd;
     
    452456}
    453457
     458/** Handshake with taskman
     459 *
     460 * Taskman is our spawn parent, i.e. PHONE_INITIAL is connected to it.
     461 * Goal of the handshake is to obtain phone to naming service and also keep the
     462 * session to taskman.
     463 *
     464 * @return EOK on success, for errors see taskman_handshake()
     465 */
    454466static errno_t ldr_taskman_handshake(void)
    455467{
     468        assert(session_primary == NULL);
     469        assert(session_taskman == NULL);
     470
    456471        errno_t retval = EOK;
    457472
     
    463478        }
    464479
    465         async_sess_t *session_tm = async_session_primary_swap(session_primary);
    466         (void)async_hangup(session_tm);
     480        session_taskman = async_session_primary_swap(session_primary);
    467481
    468482        handshake_complete = true;
Note: See TracChangeset for help on using the changeset viewer.