Changeset 87a31ef2 in mainline


Ignore:
Timestamp:
2019-08-07T11:47:00Z (5 years ago)
Author:
Matthieu Riolo <matthieu.riolo@…>
Children:
d5cca04
Parents:
4ff66ae
git-author:
Michal Koutny <xm.koutny+hos@…> (2015-11-15 11:47:07)
git-committer:
Matthieu Riolo <matthieu.riolo@…> (2019-08-07 11:47:00)
Message:

ns: Created simplified taskman API using low-level IPC API only

Conflicts:

uspace/lib/c/generic/async.c
uspace/lib/c/generic/private/async.h
uspace/lib/c/include/task.h
uspace/srv/ns/ns.c

Location:
uspace
Files:
2 added
7 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/Makefile

    r4ff66ae r87a31ef2  
    167167        generic/stats.c \
    168168        generic/taskman.c \
     169        generic/taskman_noasync.c \
    169170        generic/assert.c \
    170171        generic/bsearch.c \
  • uspace/lib/c/generic/async/client.c

    r4ff66ae r87a31ef2  
    198198}
    199199
     200int async_session_phone(async_sess_t *sess)
     201{
     202        return sess->phone;
     203}
    200204
    201205/** Initialize the async framework.
  • uspace/lib/c/generic/private/async.h

    r4ff66ae r87a31ef2  
    108108extern async_sess_t *create_session(int, exch_mgmt_t,
    109109        sysarg_t, sysarg_t, sysarg_t);
     110extern int async_session_phone(async_sess_t *);
    110111
    111112#endif
  • uspace/lib/c/include/task.h

    r4ff66ae r87a31ef2  
    3939#include <stdarg.h>
    4040#include <abi/proc/task.h>
    41 #include <async.h>
    4241#include <types/task.h>
    4342
     
    7776
    7877/* Implemented in task_event.c */
    79 extern int task_register_event_handler(task_event_handler_t);
     78extern int task_register_event_handler(task_event_handler_t, bool);
    8079
    8180#endif
  • uspace/lib/c/include/taskman.h

    r4ff66ae r87a31ef2  
    3636#define LIBC_TASKMAN_H_
    3737
    38 #ifndef TASKMAN_DISABLE_ASYNC
    3938#include <async.h>
    40 #endif
    4139
    4240/* Internal functions to be used by loader only */
    43 #ifndef TASKMAN_DISABLE_ASYNC
    4441extern async_sess_t *taskman_get_session(void);
    45 #endif
    4642extern int taskman_intro_loader(void);
    4743
  • uspace/lib/c/include/types/task.h

    r4ff66ae r87a31ef2  
    3636#define _LIBC_TYPES_TASK_H_
    3737
     38#include <async.h>
     39
    3840typedef enum {
    3941        TASK_EXIT_RUNNING,   /**< Internal taskman value. */
  • uspace/srv/ns/ns.c

    r4ff66ae r87a31ef2  
    4444#include <stdio.h>
    4545#include <errno.h>
    46 #define TASKMAN_DISABLE_ASYNC
    47 #include <taskman.h>
    48 #undef TASKMAN_DISABLE_ASYNC
     46#include <ipc/taskman.h>
     47#include <taskman_noasync.h>
    4948
    5049#include "ns.h"
     
    121120                return rc;
    122121       
    123         rc = taskman_intro_ns();
     122        rc = taskman_intro_ns_noasync();
    124123        if (rc != EOK) {
    125124                printf("%s: not accepted by taskman (%i)\n", NAME, rc);
    126125                return rc;
    127126        }
    128 
     127        task_retval_noasync(0);
     128       
    129129        async_set_fallback_port_handler(ns_connection, NULL);
    130130
    131131        printf("%s: Accepting connections\n", NAME);
    132         // TODO enable NS to use task_retval(0)
     132       
    133133        async_manager();
    134134
Note: See TracChangeset for help on using the changeset viewer.