Changeset f9b2cb4c in mainline for uspace/lib/c


Ignore:
Timestamp:
2015-08-23T12:50:23Z (10 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9ef495f
Parents:
0dd16778
Message:

unify interface API

  • introduce new interfaces
  • unify location service clients to always expect service ID as the second argument
  • remove obsolete methods that take explicit exchange management arguments (first phase)
  • use interfaces in device drivers, devman, location service, logger, inet
Location:
uspace/lib/c
Files:
1 deleted
34 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/async.c

    r0dd16778 rf9b2cb4c  
    21052105 * @param arg2            User defined argument.
    21062106 * @param arg3            User defined argument.
    2107  * @param client_receiver Connection handing routine.
    21082107 *
    21092108 * @return Zero on success or a negative error code.
     
    21112110 */
    21122111int async_connect_to_me(async_exch_t *exch, sysarg_t arg1, sysarg_t arg2,
    2113     sysarg_t arg3, async_port_handler_t client_receiver, void *data)
     2112    sysarg_t arg3)
    21142113{
    21152114        if (exch == NULL)
    21162115                return ENOENT;
    21172116       
    2118         sysarg_t phone_hash;
     2117        ipc_call_t answer;
     2118        aid_t req = async_send_3(exch, IPC_M_CONNECT_TO_ME, arg1, arg2, arg3,
     2119            &answer);
     2120       
    21192121        sysarg_t rc;
    2120 
    2121         aid_t req;
    2122         ipc_call_t answer;
    2123         req = async_send_3(exch, IPC_M_CONNECT_TO_ME, arg1, arg2, arg3,
    2124             &answer);
    21252122        async_wait_for(req, &rc);
    21262123        if (rc != EOK)
    21272124                return (int) rc;
    2128 
    2129         phone_hash = IPC_GET_ARG5(answer);
    2130 
    2131         if (client_receiver != NULL)
    2132                 async_new_connection(answer.in_task_id, phone_hash, 0, NULL,
    2133                     client_receiver, data);
    21342125       
    21352126        return EOK;
     
    22612252        int phone = async_connect_me_to_internal(exch->phone, arg1, arg2, arg3,
    22622253            0);
    2263        
    22642254        if (phone < 0) {
    22652255                errno = phone;
  • uspace/lib/c/generic/bd.c

    r0dd16778 rf9b2cb4c  
    5757        async_exch_t *exch = async_exchange_begin(sess);
    5858       
    59         int rc = async_connect_to_me(exch, 0, 0, 0, bd_cb_conn, bd);
     59        port_id_t port;
     60        int rc = async_create_callback_port(exch, INTERFACE_BLOCK_CB, 0, 0,
     61            bd_cb_conn, bd, &port);
     62       
    6063        async_exchange_end(exch);
    6164       
  • uspace/lib/c/generic/clipboard.c

    r0dd16778 rf9b2cb4c  
    6161       
    6262        while (clip_sess == NULL)
    63                 clip_sess = service_connect_blocking(EXCHANGE_SERIALIZE,
    64                     SERVICE_CLIPBOARD, 0);
     63                clip_sess = service_connect_blocking(SERVICE_CLIPBOARD,
     64                    INTERFACE_CLIPBOARD, 0);
    6565       
    6666        fibril_mutex_unlock(&clip_mutex);
  • uspace/lib/c/generic/corecfg.c

    r0dd16778 rf9b2cb4c  
    5050                return ENOENT;
    5151
    52         corecfg_sess = loc_service_connect(EXCHANGE_SERIALIZE, corecfg_svc,
     52        corecfg_sess = loc_service_connect(corecfg_svc, INTERFACE_CORECFG,
    5353            IPC_FLAG_BLOCKING);
    5454        if (corecfg_sess == NULL)
  • uspace/lib/c/generic/devman.c

    r0dd16778 rf9b2cb4c  
    7777 *
    7878 */
    79 async_exch_t *devman_exchange_begin_blocking(devman_interface_t iface)
     79async_exch_t *devman_exchange_begin_blocking(iface_t iface)
    8080{
    8181        switch (iface) {
    82         case DEVMAN_DRIVER:
     82        case INTERFACE_DDF_DRIVER:
    8383                fibril_mutex_lock(&devman_driver_block_mutex);
    8484               
     
    8989                        if (devman_driver_block_sess == NULL)
    9090                                devman_driver_block_sess =
    91                                     service_connect_blocking_iface(EXCHANGE_PARALLEL,
    92                                     DEVMAN_DRIVER, SERVICE_DEVMAN, 0);
     91                                    service_connect_blocking(SERVICE_DEVMAN,
     92                                    INTERFACE_DDF_DRIVER, 0);
    9393                }
    9494               
     
    9999               
    100100                return async_exchange_begin(devman_driver_block_sess);
    101         case DEVMAN_CLIENT:
     101        case INTERFACE_DDF_CLIENT:
    102102                fibril_mutex_lock(&devman_client_block_mutex);
    103103               
     
    108108                        if (devman_client_block_sess == NULL)
    109109                                devman_client_block_sess =
    110                                     service_connect_blocking_iface(EXCHANGE_SERIALIZE,
    111                                     DEVMAN_CLIENT, SERVICE_DEVMAN, 0);
     110                                    service_connect_blocking(SERVICE_DEVMAN,
     111                                    INTERFACE_DDF_CLIENT, 0);
    112112                }
    113113               
     
    130130 *
    131131 */
    132 async_exch_t *devman_exchange_begin(devman_interface_t iface)
     132async_exch_t *devman_exchange_begin(iface_t iface)
    133133{
    134134        switch (iface) {
    135         case DEVMAN_DRIVER:
     135        case INTERFACE_DDF_DRIVER:
    136136                fibril_mutex_lock(&devman_driver_mutex);
    137137               
    138138                if (devman_driver_sess == NULL)
    139139                        devman_driver_sess =
    140                             service_connect_iface(EXCHANGE_PARALLEL, DEVMAN_DRIVER,
    141                             SERVICE_DEVMAN, 0);
     140                            service_connect(SERVICE_DEVMAN,
     141                            INTERFACE_DDF_DRIVER, 0);
    142142               
    143143                fibril_mutex_unlock(&devman_driver_mutex);
     
    147147               
    148148                return async_exchange_begin(devman_driver_sess);
    149         case DEVMAN_CLIENT:
     149        case INTERFACE_DDF_CLIENT:
    150150                fibril_mutex_lock(&devman_client_mutex);
    151151               
    152152                if (devman_client_sess == NULL)
    153153                        devman_client_sess =
    154                             service_connect_iface(EXCHANGE_SERIALIZE, DEVMAN_CLIENT,
    155                             SERVICE_DEVMAN, 0);
     154                            service_connect(SERVICE_DEVMAN,
     155                            INTERFACE_DDF_CLIENT, 0);
    156156               
    157157                fibril_mutex_unlock(&devman_client_mutex);
     
    179179int devman_driver_register(const char *name)
    180180{
    181         async_exch_t *exch = devman_exchange_begin_blocking(DEVMAN_DRIVER);
     181        async_exch_t *exch = devman_exchange_begin_blocking(INTERFACE_DDF_DRIVER);
    182182       
    183183        ipc_call_t answer;
     
    192192        }
    193193       
    194         exch = devman_exchange_begin(DEVMAN_DRIVER);
    195         async_connect_to_me(exch, 0, 0, 0, NULL, NULL);
     194        exch = devman_exchange_begin(INTERFACE_DDF_DRIVER);
     195        async_connect_to_me(exch, 0, 0, 0);
    196196        devman_exchange_end(exch);
    197197       
     
    218218{
    219219        int match_count = list_count(&match_ids->ids);
    220         async_exch_t *exch = devman_exchange_begin_blocking(DEVMAN_DRIVER);
     220        async_exch_t *exch = devman_exchange_begin_blocking(INTERFACE_DDF_DRIVER);
    221221       
    222222        ipc_call_t answer;
     
    268268    const char *cat_name)
    269269{
    270         async_exch_t *exch = devman_exchange_begin_blocking(DEVMAN_DRIVER);
     270        async_exch_t *exch = devman_exchange_begin_blocking(INTERFACE_DDF_DRIVER);
    271271       
    272272        ipc_call_t answer;
     
    287287}
    288288
    289 async_sess_t *devman_device_connect(exch_mgmt_t mgmt, devman_handle_t handle,
    290     unsigned int flags)
     289async_sess_t *devman_device_connect(devman_handle_t handle, unsigned int flags)
    291290{
    292291        async_sess_t *sess;
    293292       
    294293        if (flags & IPC_FLAG_BLOCKING)
    295                 sess = service_connect_blocking_iface(mgmt, DEVMAN_CONNECT_TO_DEVICE,
    296                     SERVICE_DEVMAN, handle);
     294                sess = service_connect_blocking(SERVICE_DEVMAN,
     295                    INTERFACE_DEVMAN_DEVICE, handle);
    297296        else
    298                 sess = service_connect_iface(mgmt, DEVMAN_CONNECT_TO_DEVICE,
    299                     SERVICE_DEVMAN, handle);
     297                sess = service_connect(SERVICE_DEVMAN,
     298                    INTERFACE_DEVMAN_DEVICE, handle);
    300299       
    301300        return sess;
     
    314313        sysarg_t retval;
    315314       
    316         exch = devman_exchange_begin_blocking(DEVMAN_DRIVER);
     315        exch = devman_exchange_begin_blocking(INTERFACE_DDF_DRIVER);
    317316        retval = async_req_1_0(exch, DEVMAN_REMOVE_FUNCTION, (sysarg_t) funh);
    318317        devman_exchange_end(exch);
     
    323322int devman_drv_fun_online(devman_handle_t funh)
    324323{
    325         async_exch_t *exch = devman_exchange_begin(DEVMAN_DRIVER);
     324        async_exch_t *exch = devman_exchange_begin(INTERFACE_DDF_DRIVER);
    326325        if (exch == NULL)
    327326                return ENOMEM;
     
    335334int devman_drv_fun_offline(devman_handle_t funh)
    336335{
    337         async_exch_t *exch = devman_exchange_begin(DEVMAN_DRIVER);
     336        async_exch_t *exch = devman_exchange_begin(INTERFACE_DDF_DRIVER);
    338337        if (exch == NULL)
    339338                return ENOMEM;
     
    345344}
    346345
    347 async_sess_t *devman_parent_device_connect(exch_mgmt_t mgmt,
    348     devman_handle_t handle, unsigned int flags)
     346async_sess_t *devman_parent_device_connect(devman_handle_t handle,
     347    unsigned int flags)
    349348{
    350349        async_sess_t *sess;
    351350       
    352351        if (flags & IPC_FLAG_BLOCKING)
    353                 sess = service_connect_blocking_iface(mgmt,
    354                             DEVMAN_CONNECT_TO_PARENTS_DEVICE, SERVICE_DEVMAN, handle);
     352                sess = service_connect_blocking(SERVICE_DEVMAN,
     353                    INTERFACE_DEVMAN_PARENT, handle);
    355354        else
    356                 sess = service_connect_iface(mgmt,
    357                             DEVMAN_CONNECT_TO_PARENTS_DEVICE, SERVICE_DEVMAN, handle);
     355                sess = service_connect_blocking(SERVICE_DEVMAN,
     356                    INTERFACE_DEVMAN_PARENT, handle);
    358357       
    359358        return sess;
     
    366365       
    367366        if (flags & IPC_FLAG_BLOCKING)
    368                 exch = devman_exchange_begin_blocking(DEVMAN_CLIENT);
     367                exch = devman_exchange_begin_blocking(INTERFACE_DDF_CLIENT);
    369368        else {
    370                 exch = devman_exchange_begin(DEVMAN_CLIENT);
     369                exch = devman_exchange_begin(INTERFACE_DDF_CLIENT);
    371370                if (exch == NULL)
    372371                        return ENOMEM;
     
    409408        sysarg_t dretval;
    410409       
    411         exch = devman_exchange_begin_blocking(DEVMAN_CLIENT);
     410        exch = devman_exchange_begin_blocking(INTERFACE_DDF_CLIENT);
    412411       
    413412        ipc_call_t answer;
     
    474473int devman_fun_online(devman_handle_t funh)
    475474{
    476         async_exch_t *exch = devman_exchange_begin(DEVMAN_CLIENT);
     475        async_exch_t *exch = devman_exchange_begin(INTERFACE_DDF_CLIENT);
    477476        if (exch == NULL)
    478477                return ENOMEM;
     
    486485int devman_fun_offline(devman_handle_t funh)
    487486{
    488         async_exch_t *exch = devman_exchange_begin(DEVMAN_CLIENT);
     487        async_exch_t *exch = devman_exchange_begin(INTERFACE_DDF_CLIENT);
    489488        if (exch == NULL)
    490489                return ENOMEM;
     
    499498    devman_handle_t *handle_buf, size_t buf_size, size_t *act_size)
    500499{
    501         async_exch_t *exch = devman_exchange_begin_blocking(DEVMAN_CLIENT);
     500        async_exch_t *exch = devman_exchange_begin_blocking(INTERFACE_DDF_CLIENT);
    502501
    503502        ipc_call_t answer;
     
    578577int devman_fun_get_child(devman_handle_t funh, devman_handle_t *devh)
    579578{
    580         async_exch_t *exch = devman_exchange_begin(DEVMAN_CLIENT);
     579        async_exch_t *exch = devman_exchange_begin(INTERFACE_DDF_CLIENT);
    581580        if (exch == NULL)
    582581                return ENOMEM;
     
    598597int devman_dev_get_parent(devman_handle_t devh, devman_handle_t *funh)
    599598{
    600         async_exch_t *exch = devman_exchange_begin(DEVMAN_CLIENT);
     599        async_exch_t *exch = devman_exchange_begin(INTERFACE_DDF_CLIENT);
    601600        if (exch == NULL)
    602601                return ENOMEM;
     
    611610int devman_fun_sid_to_handle(service_id_t sid, devman_handle_t *handle)
    612611{
    613         async_exch_t *exch = devman_exchange_begin(DEVMAN_CLIENT);
     612        async_exch_t *exch = devman_exchange_begin(INTERFACE_DDF_CLIENT);
    614613        if (exch == NULL)
    615614                return ENOMEM;
     
    639638        async_exch_t *exch;
    640639
    641         exch = devman_exchange_begin(DEVMAN_CLIENT);
     640        exch = devman_exchange_begin(INTERFACE_DDF_CLIENT);
    642641        if (exch == NULL)
    643642                return ENOMEM;
     
    694693{
    695694        sysarg_t state;
    696         async_exch_t *exch = devman_exchange_begin(DEVMAN_CLIENT);
     695        async_exch_t *exch = devman_exchange_begin(INTERFACE_DDF_CLIENT);
    697696        if (exch == NULL)
    698697                return ENOMEM;
     
    711710int devman_driver_load(devman_handle_t drvh)
    712711{
    713         async_exch_t *exch = devman_exchange_begin(DEVMAN_CLIENT);
     712        async_exch_t *exch = devman_exchange_begin(INTERFACE_DDF_CLIENT);
    714713        if (exch == NULL)
    715714                return ENOMEM;
  • uspace/lib/c/generic/dhcp.c

    r0dd16778 rf9b2cb4c  
    5656                return ENOENT;
    5757
    58         dhcp_sess = loc_service_connect(EXCHANGE_SERIALIZE, dhcp_svc,
     58        dhcp_sess = loc_service_connect(dhcp_svc, INTERFACE_DHCP,
    5959            IPC_FLAG_BLOCKING);
    6060        if (dhcp_sess == NULL)
  • uspace/lib/c/generic/dnsr.c

    r0dd16778 rf9b2cb4c  
    5252                    IPC_FLAG_BLOCKING);
    5353               
    54                 dnsr_sess = loc_service_connect(EXCHANGE_SERIALIZE, dnsr_svc,
     54                dnsr_sess = loc_service_connect(dnsr_svc, INTERFACE_DNSR,
    5555                    IPC_FLAG_BLOCKING);
    5656        }
  • uspace/lib/c/generic/inet.c

    r0dd16778 rf9b2cb4c  
    4848        ipc_call_t answer;
    4949        aid_t req = async_send_0(exch, INET_CALLBACK_CREATE, &answer);
    50         int rc = async_connect_to_me(exch, 0, 0, 0, inet_cb_conn, NULL);
     50       
     51        port_id_t port;
     52        int rc = async_create_callback_port(exch, INTERFACE_INET_CB, 0, 0,
     53            inet_cb_conn, NULL, &port);
     54       
    5155        async_exchange_end(exch);
    5256       
     
    8387                return ENOENT;
    8488       
    85         inet_sess = loc_service_connect(EXCHANGE_SERIALIZE, inet_svc,
     89        inet_sess = loc_service_connect(inet_svc, INTERFACE_INET,
    8690            IPC_FLAG_BLOCKING);
    8791        if (inet_sess == NULL)
  • uspace/lib/c/generic/inet/tcp.c

    r0dd16778 rf9b2cb4c  
    112112        }
    113113
    114         tcp->sess = loc_service_connect(EXCHANGE_SERIALIZE, tcp_svcid,
     114        tcp->sess = loc_service_connect(tcp_svcid, INTERFACE_TCP,
    115115            IPC_FLAG_BLOCKING);
    116116        if (tcp->sess == NULL) {
  • uspace/lib/c/generic/inet/udp.c

    r0dd16778 rf9b2cb4c  
    9898        }
    9999
    100         udp->sess = loc_service_connect(EXCHANGE_SERIALIZE, udp_svcid,
     100        udp->sess = loc_service_connect(udp_svcid, INTERFACE_UDP,
    101101            IPC_FLAG_BLOCKING);
    102102        if (udp->sess == NULL) {
  • uspace/lib/c/generic/inetcfg.c

    r0dd16778 rf9b2cb4c  
    120120        assert(inetcfg_sess == NULL);
    121121       
    122         rc = loc_service_get_id(SERVICE_NAME_INETCFG, &inet_svc,
     122        rc = loc_service_get_id(SERVICE_NAME_INET, &inet_svc,
    123123            IPC_FLAG_BLOCKING);
    124124        if (rc != EOK)
    125125                return ENOENT;
    126126       
    127         inetcfg_sess = loc_service_connect(EXCHANGE_SERIALIZE, inet_svc,
     127        inetcfg_sess = loc_service_connect(inet_svc, INTERFACE_INETCFG,
    128128            IPC_FLAG_BLOCKING);
    129129        if (inetcfg_sess == NULL)
  • uspace/lib/c/generic/inetping.c

    r0dd16778 rf9b2cb4c  
    5353        inetping_ev_ops = ev_ops;
    5454
    55         rc = loc_service_get_id(SERVICE_NAME_INETPING, &inetping_svc,
     55        rc = loc_service_get_id(SERVICE_NAME_INET, &inetping_svc,
    5656            IPC_FLAG_BLOCKING);
    5757        if (rc != EOK)
    5858                return ENOENT;
    5959
    60         inetping_sess = loc_service_connect(EXCHANGE_SERIALIZE, inetping_svc,
     60        inetping_sess = loc_service_connect(inetping_svc, INTERFACE_INETPING,
    6161            IPC_FLAG_BLOCKING);
    6262        if (inetping_sess == NULL)
     
    6565        async_exch_t *exch = async_exchange_begin(inetping_sess);
    6666
    67         rc = async_connect_to_me(exch, 0, 0, 0, inetping_cb_conn, NULL);
     67        port_id_t port;
     68        rc = async_create_callback_port(exch, INTERFACE_INETPING_CB, 0, 0,
     69            inetping_cb_conn, NULL, &port);
     70       
    6871        async_exchange_end(exch);
    6972
  • uspace/lib/c/generic/io/console.c

    r0dd16778 rf9b2cb4c  
    4949                return NULL;
    5050       
    51         ctrl->input_sess = fsession(EXCHANGE_SERIALIZE, ifile);
     51        ctrl->input_sess = fsession(ifile, INTERFACE_CONSOLE);
    5252        if (!ctrl->input_sess) {
    5353                free(ctrl);
     
    5555        }
    5656       
    57         ctrl->output_sess = fsession(EXCHANGE_SERIALIZE, ofile);
     57        ctrl->output_sess = fsession(ofile, INTERFACE_CONSOLE);
    5858        if (!ctrl->output_sess) {
    5959                free(ctrl);
  • uspace/lib/c/generic/io/input.c

    r0dd16778 rf9b2cb4c  
    5858        async_exch_t *exch = async_exchange_begin(sess);
    5959
    60         int rc = async_connect_to_me(exch, 0, 0, 0, input_cb_conn, input);
     60        port_id_t port;
     61        int rc = async_create_callback_port(exch, INTERFACE_INPUT_CB, 0, 0,
     62            input_cb_conn, input, &port);
     63       
    6164        async_exchange_end(exch);
    6265
  • uspace/lib/c/generic/io/io.c

    r0dd16778 rf9b2cb4c  
    748748}
    749749
    750 async_sess_t *fsession(exch_mgmt_t mgmt, FILE *stream)
     750async_sess_t *fsession(FILE *stream, iface_t iface)
    751751{
    752752        if (stream->fd >= 0) {
    753753                if (stream->sess == NULL)
    754                         stream->sess = fd_session(mgmt, stream->fd);
     754                        stream->sess = fd_session(stream->fd, iface);
    755755               
    756756                return stream->sess;
  • uspace/lib/c/generic/io/log.c

    r0dd16778 rf9b2cb4c  
    166166                return ENOMEM;
    167167
    168         logger_session = service_connect_blocking_iface(EXCHANGE_SERIALIZE,
    169             LOGGER_INTERFACE_WRITER, SERVICE_LOGGER, 0);
     168        logger_session = service_connect_blocking(SERVICE_LOGGER,
     169            INTERFACE_LOGGER_WRITER, 0);
    170170        if (logger_session == NULL) {
    171171                return ENOMEM;
  • uspace/lib/c/generic/io/logctl.c

    r0dd16778 rf9b2cb4c  
    4848
    4949        if (logger_session == NULL) {
    50                 logger_session = service_connect_blocking_iface(EXCHANGE_SERIALIZE,
    51                     LOGGER_INTERFACE_CONTROL, SERVICE_LOGGER, 0);
     50                logger_session = service_connect_blocking(SERVICE_LOGGER,
     51                    INTERFACE_LOGGER_CONTROL, 0);
    5252                if (logger_session == NULL)
    5353                        return ENOMEM;
  • uspace/lib/c/generic/iplink.c

    r0dd16778 rf9b2cb4c  
    5959       
    6060        async_exch_t *exch = async_exchange_begin(sess);
    61        
    62         int rc = async_connect_to_me(exch, 0, 0, 0, iplink_cb_conn, iplink);
     61
     62        port_id_t port;
     63        int rc = async_create_callback_port(exch, INTERFACE_IPLINK_CB, 0, 0,
     64            iplink_cb_conn, iplink, &port);
     65       
    6366        async_exchange_end(exch);
    6467       
  • uspace/lib/c/generic/irc.c

    r0dd16778 rf9b2cb4c  
    5151        assert(irc_sess == NULL);
    5252
    53         irc_sess = service_connect_blocking(EXCHANGE_SERIALIZE,
    54             SERVICE_IRC, 0);
     53        irc_sess = service_connect_blocking(SERVICE_IRC, INTERFACE_IRC, 0);
    5554
    5655        if (irc_sess == NULL)
  • uspace/lib/c/generic/loader.c

    r0dd16778 rf9b2cb4c  
    6969       
    7070        async_sess_t *sess =
    71             service_connect_blocking_iface_extended(SERVICE_LOADER,
    72             INTERFACE_LOADER, 0);
     71            service_connect_blocking(SERVICE_LOADER, INTERFACE_LOADER, 0);
    7372        if (sess == NULL) {
    7473                free(ldr);
  • uspace/lib/c/generic/loc.c

    r0dd16778 rf9b2cb4c  
    107107        if (!loc_callback_created) {
    108108                async_exch_t *exch =
    109                     loc_exchange_begin_blocking(LOC_PORT_CONSUMER);
     109                    loc_exchange_begin_blocking(INTERFACE_LOC_CONSUMER);
    110110               
    111111                ipc_call_t answer;
    112112                aid_t req = async_send_0(exch, LOC_CALLBACK_CREATE, &answer);
    113                 int rc = async_connect_to_me(exch, 0, 0, 0, loc_cb_conn, NULL);
     113               
     114                port_id_t port;
     115                int rc = async_create_callback_port(exch, INTERFACE_LOC_CB, 0, 0,
     116                    loc_cb_conn, NULL, &port);
     117               
    114118                loc_exchange_end(exch);
    115119               
     
    135139 *
    136140 */
    137 async_exch_t *loc_exchange_begin_blocking(loc_interface_t iface)
     141async_exch_t *loc_exchange_begin_blocking(iface_t iface)
    138142{
    139143        switch (iface) {
    140         case LOC_PORT_SUPPLIER:
     144        case INTERFACE_LOC_SUPPLIER:
    141145                fibril_mutex_lock(&loc_supp_block_mutex);
    142146               
     
    147151                        if (loc_supp_block_sess == NULL)
    148152                                loc_supp_block_sess =
    149                                     service_connect_blocking_iface(EXCHANGE_SERIALIZE,
    150                                     LOC_PORT_SUPPLIER, SERVICE_LOC, 0);
     153                                    service_connect_blocking(SERVICE_LOC,
     154                                    INTERFACE_LOC_SUPPLIER, 0);
    151155                }
    152156               
     
    157161               
    158162                return async_exchange_begin(loc_supp_block_sess);
    159         case LOC_PORT_CONSUMER:
     163        case INTERFACE_LOC_CONSUMER:
    160164                fibril_mutex_lock(&loc_cons_block_mutex);
    161165               
     
    166170                        if (loc_cons_block_sess == NULL)
    167171                                loc_cons_block_sess =
    168                                     service_connect_blocking_iface(EXCHANGE_SERIALIZE,
    169                                     LOC_PORT_CONSUMER, SERVICE_LOC, 0);
     172                                    service_connect_blocking(SERVICE_LOC,
     173                                    INTERFACE_LOC_CONSUMER, 0);
    170174                }
    171175               
     
    188192 *
    189193 */
    190 async_exch_t *loc_exchange_begin(loc_interface_t iface)
     194async_exch_t *loc_exchange_begin(iface_t iface)
    191195{
    192196        switch (iface) {
    193         case LOC_PORT_SUPPLIER:
     197        case INTERFACE_LOC_SUPPLIER:
    194198                fibril_mutex_lock(&loc_supplier_mutex);
    195199               
    196200                if (loc_supplier_sess == NULL)
    197201                        loc_supplier_sess =
    198                             service_connect_iface(EXCHANGE_SERIALIZE, LOC_PORT_SUPPLIER,
    199                             SERVICE_LOC, 0);
     202                            service_connect(SERVICE_LOC,
     203                            INTERFACE_LOC_SUPPLIER, 0);
    200204               
    201205                fibril_mutex_unlock(&loc_supplier_mutex);
     
    205209               
    206210                return async_exchange_begin(loc_supplier_sess);
    207         case LOC_PORT_CONSUMER:
     211        case INTERFACE_LOC_CONSUMER:
    208212                fibril_mutex_lock(&loc_consumer_mutex);
    209213               
    210214                if (loc_consumer_sess == NULL)
    211215                        loc_consumer_sess =
    212                             service_connect_iface(EXCHANGE_SERIALIZE, LOC_PORT_CONSUMER,
    213                             SERVICE_LOC, 0);
     216                            service_connect(SERVICE_LOC,
     217                            INTERFACE_LOC_CONSUMER, 0);
    214218               
    215219                fibril_mutex_unlock(&loc_consumer_mutex);
     
    237241int loc_server_register(const char *name)
    238242{
    239         async_exch_t *exch = loc_exchange_begin_blocking(LOC_PORT_SUPPLIER);
     243        async_exch_t *exch = loc_exchange_begin_blocking(INTERFACE_LOC_SUPPLIER);
    240244       
    241245        ipc_call_t answer;
     
    250254        }
    251255       
    252         exch = loc_exchange_begin(LOC_PORT_SUPPLIER);
    253         async_connect_to_me(exch, 0, 0, 0, NULL, NULL);
     256        exch = loc_exchange_begin(INTERFACE_LOC_SUPPLIER);
     257        async_connect_to_me(exch, 0, 0, 0);
    254258        loc_exchange_end(exch);
    255259       
     
    260264/** Register new service.
    261265 *
    262  * The @p interface is used when forwarding connection to the server.
    263  * If not 0, the first argument is the interface and the second argument
    264  * is the service ID.
    265  *
    266  * When the interface is zero (default), the first argument is directly
    267  * the handle (to ensure backward compatibility).
    268  *
    269  * @param      fqsn      Fully qualified service name
    270  * @param[out] sid       Service ID of new service
    271  * @param      interface Interface when forwarding
    272  *
    273  */
    274 int loc_service_register_with_iface(const char *fqsn,
    275     service_id_t *sid, sysarg_t interface)
    276 {
    277         async_exch_t *exch = loc_exchange_begin_blocking(LOC_PORT_SUPPLIER);
     266 * @param      fqsn  Fully qualified service name
     267 * @param[out] sid   Service ID of new service
     268 *
     269 */
     270int loc_service_register(const char *fqsn, service_id_t *sid)
     271{
     272        async_exch_t *exch = loc_exchange_begin_blocking(INTERFACE_LOC_SUPPLIER);
    278273       
    279274        ipc_call_t answer;
    280         aid_t req = async_send_2(exch, LOC_SERVICE_REGISTER, interface, 0,
    281             &answer);
     275        aid_t req = async_send_0(exch, LOC_SERVICE_REGISTER, &answer);
    282276        sysarg_t retval = async_data_write_start(exch, fqsn, str_size(fqsn));
    283277       
     
    304298}
    305299
    306 /** Register new service.
    307  *
    308  * @param fqsn Fully qualified service name
    309  * @param sid  Output: ID of new service
    310  *
    311  */
    312 int loc_service_register(const char *fqdn, service_id_t *sid)
    313 {
    314         return loc_service_register_with_iface(fqdn, sid, 0);
    315 }
    316 
    317300/** Unregister service.
    318301 *
     
    324307        sysarg_t retval;
    325308       
    326         exch = loc_exchange_begin_blocking(LOC_PORT_SUPPLIER);
     309        exch = loc_exchange_begin_blocking(INTERFACE_LOC_SUPPLIER);
    327310        retval = async_req_1_0(exch, LOC_SERVICE_UNREGISTER, sid);
    328311        loc_exchange_end(exch);
     
    337320       
    338321        if (flags & IPC_FLAG_BLOCKING)
    339                 exch = loc_exchange_begin_blocking(LOC_PORT_CONSUMER);
     322                exch = loc_exchange_begin_blocking(INTERFACE_LOC_CONSUMER);
    340323        else {
    341                 exch = loc_exchange_begin(LOC_PORT_CONSUMER);
     324                exch = loc_exchange_begin(INTERFACE_LOC_CONSUMER);
    342325                if (exch == NULL)
    343326                        return errno;
     
    390373       
    391374        *name = NULL;
    392         exch = loc_exchange_begin_blocking(LOC_PORT_CONSUMER);
     375        exch = loc_exchange_begin_blocking(INTERFACE_LOC_CONSUMER);
    393376       
    394377        ipc_call_t answer;
     
    470453       
    471454        if (flags & IPC_FLAG_BLOCKING)
    472                 exch = loc_exchange_begin_blocking(LOC_PORT_CONSUMER);
     455                exch = loc_exchange_begin_blocking(INTERFACE_LOC_CONSUMER);
    473456        else {
    474                 exch = loc_exchange_begin(LOC_PORT_CONSUMER);
     457                exch = loc_exchange_begin(INTERFACE_LOC_CONSUMER);
    475458                if (exch == NULL)
    476459                        return errno;
     
    519502       
    520503        if (flags & IPC_FLAG_BLOCKING)
    521                 exch = loc_exchange_begin_blocking(LOC_PORT_CONSUMER);
     504                exch = loc_exchange_begin_blocking(INTERFACE_LOC_CONSUMER);
    522505        else {
    523                 exch = loc_exchange_begin(LOC_PORT_CONSUMER);
     506                exch = loc_exchange_begin(INTERFACE_LOC_CONSUMER);
    524507                if (exch == NULL)
    525508                        return errno;
     
    556539loc_object_type_t loc_id_probe(service_id_t handle)
    557540{
    558         async_exch_t *exch = loc_exchange_begin_blocking(LOC_PORT_CONSUMER);
     541        async_exch_t *exch = loc_exchange_begin_blocking(INTERFACE_LOC_CONSUMER);
    559542       
    560543        sysarg_t type;
     
    569552}
    570553
    571 async_sess_t *loc_service_connect_iface(service_id_t handle, iface_t iface,
     554async_sess_t *loc_service_connect(service_id_t handle, iface_t iface,
    572555    unsigned int flags)
    573556{
     
    575558       
    576559        if (flags & IPC_FLAG_BLOCKING)
    577                 sess = service_connect_blocking_iface_extended(SERVICE_LOC, iface, handle);
     560                sess = service_connect_blocking(SERVICE_LOC, iface, handle);
    578561        else
    579                 sess = service_connect_iface_extended(SERVICE_LOC, iface, handle);
     562                sess = service_connect(SERVICE_LOC, iface, handle);
    580563       
    581564        return sess;
    582565}
    583566
    584 async_sess_t *loc_service_connect(exch_mgmt_t mgmt, service_id_t handle,
    585     unsigned int flags)
    586 {
    587         async_sess_t *sess;
    588        
    589         if (flags & IPC_FLAG_BLOCKING)
    590                 sess = service_connect_blocking_iface(mgmt, LOC_CONNECT_TO_SERVICE,
    591                     SERVICE_LOC, handle);
    592         else
    593                 sess = service_connect_iface(mgmt, LOC_CONNECT_TO_SERVICE,
    594                     SERVICE_LOC, handle);
    595        
    596         return sess;
    597 }
    598 
    599567int loc_null_create(void)
    600568{
    601         async_exch_t *exch = loc_exchange_begin_blocking(LOC_PORT_CONSUMER);
     569        async_exch_t *exch = loc_exchange_begin_blocking(INTERFACE_LOC_CONSUMER);
    602570       
    603571        sysarg_t null_id;
     
    614582void loc_null_destroy(int null_id)
    615583{
    616         async_exch_t *exch = loc_exchange_begin_blocking(LOC_PORT_CONSUMER);
     584        async_exch_t *exch = loc_exchange_begin_blocking(INTERFACE_LOC_CONSUMER);
    617585        async_req_1_0(exch, LOC_NULL_DESTROY, (sysarg_t) null_id);
    618586        loc_exchange_end(exch);
     
    640608        sysarg_t retval;
    641609       
    642         exch = loc_exchange_begin_blocking(LOC_PORT_SUPPLIER);
     610        exch = loc_exchange_begin_blocking(INTERFACE_LOC_SUPPLIER);
    643611        retval = async_req_2_0(exch, LOC_SERVICE_ADD_TO_CAT, svc_id, cat_id);
    644612        loc_exchange_end(exch);
     
    661629size_t loc_count_namespaces(void)
    662630{
    663         async_exch_t *exch = loc_exchange_begin_blocking(LOC_PORT_CONSUMER);
     631        async_exch_t *exch = loc_exchange_begin_blocking(INTERFACE_LOC_CONSUMER);
    664632        size_t size = loc_count_namespaces_internal(exch);
    665633        loc_exchange_end(exch);
     
    670638size_t loc_count_services(service_id_t ns_handle)
    671639{
    672         async_exch_t *exch = loc_exchange_begin_blocking(LOC_PORT_CONSUMER);
     640        async_exch_t *exch = loc_exchange_begin_blocking(INTERFACE_LOC_CONSUMER);
    673641        size_t size = loc_count_services_internal(exch, ns_handle);
    674642        loc_exchange_end(exch);
     
    681649        /* Loop until read is succesful */
    682650        while (true) {
    683                 async_exch_t *exch = loc_exchange_begin_blocking(LOC_PORT_CONSUMER);
     651                async_exch_t *exch = loc_exchange_begin_blocking(INTERFACE_LOC_CONSUMER);
    684652                size_t count = loc_count_namespaces_internal(exch);
    685653                loc_exchange_end(exch);
     
    692660                        return 0;
    693661               
    694                 exch = loc_exchange_begin(LOC_PORT_CONSUMER);
     662                exch = loc_exchange_begin(INTERFACE_LOC_CONSUMER);
    695663               
    696664                ipc_call_t answer;
     
    730698        /* Loop until read is succesful */
    731699        while (true) {
    732                 async_exch_t *exch = loc_exchange_begin_blocking(LOC_PORT_CONSUMER);
     700                async_exch_t *exch = loc_exchange_begin_blocking(INTERFACE_LOC_CONSUMER);
    733701                size_t count = loc_count_services_internal(exch, ns_handle);
    734702                loc_exchange_end(exch);
     
    741709                        return 0;
    742710               
    743                 exch = loc_exchange_begin(LOC_PORT_CONSUMER);
     711                exch = loc_exchange_begin(INTERFACE_LOC_CONSUMER);
    744712               
    745713                ipc_call_t answer;
     
    778746    sysarg_t *id_buf, size_t buf_size, size_t *act_size)
    779747{
    780         async_exch_t *exch = loc_exchange_begin_blocking(LOC_PORT_CONSUMER);
     748        async_exch_t *exch = loc_exchange_begin_blocking(INTERFACE_LOC_CONSUMER);
    781749
    782750        ipc_call_t answer;
  • uspace/lib/c/generic/ns.c

    r0dd16778 rf9b2cb4c  
    4343{
    4444        async_exch_t *exch = async_exchange_begin(session_ns);
    45         int rc = async_connect_to_me(exch, 0, service, 0, NULL, NULL);
     45        int rc = async_connect_to_me(exch, 0, service, 0);
    4646        async_exchange_end(exch);
    4747       
     
    4949}
    5050
    51 async_sess_t *service_connect_iface(exch_mgmt_t mgmt, sysarg_t iface,
    52     service_t service, sysarg_t arg3)
    53 {
    54         async_exch_t *exch = async_exchange_begin(session_ns);
    55         if (!exch)
    56                 return NULL;
    57        
    58         async_sess_t *sess =
    59             async_connect_me_to(mgmt, exch, iface, service, arg3);
    60         async_exchange_end(exch);
    61        
    62         if (!sess)
    63                 return NULL;
    64        
    65         /*
    66          * FIXME Ugly hack to work around limitation of implementing
    67          * parallel exchanges using multiple connections. Shift out
    68          * first argument for non-initial connections.
    69          */
    70         async_sess_args_set(sess, iface, arg3, 0);
    71        
    72         return sess;
    73 }
    7451
    75 async_sess_t *service_connect_iface_extended(service_t service, iface_t iface,
    76     sysarg_t arg3)
     52async_sess_t *service_connect(service_t service, iface_t iface, sysarg_t arg3)
    7753{
    7854        async_exch_t *exch = async_exchange_begin(session_ns);
     
    9773}
    9874
    99 async_sess_t *service_connect(exch_mgmt_t mgmt, service_t service, sysarg_t arg3)
    100 {
    101         async_exch_t *exch = async_exchange_begin(session_ns);
    102         if (!exch)
    103                 return NULL;
    104        
    105         async_sess_t *sess =
    106             async_connect_me_to(mgmt, exch, 0, service, arg3);
    107         async_exchange_end(exch);
    108        
    109         if (!sess)
    110                 return NULL;
    111        
    112         /*
    113          * FIXME Ugly hack to work around limitation of implementing
    114          * parallel exchanges using multiple connections. Shift out
    115          * first argument for non-initial connections.
    116          */
    117         async_sess_args_set(sess, 0, arg3, 0);
    118        
    119         return sess;
    120 }
    121 
    122 async_sess_t *service_connect_blocking_iface(exch_mgmt_t mgmt, sysarg_t iface,
    123     service_t service, sysarg_t arg3)
    124 {
    125         async_exch_t *exch = async_exchange_begin(session_ns);
    126         if (!exch)
    127                 return NULL;
    128         async_sess_t *sess =
    129             async_connect_me_to_blocking(mgmt, exch, iface, service, arg3);
    130         async_exchange_end(exch);
    131        
    132         if (!sess)
    133                 return NULL;
    134        
    135         /*
    136          * FIXME Ugly hack to work around limitation of implementing
    137          * parallel exchanges using multiple connections. Shift out
    138          * first argument for non-initial connections.
    139          */
    140         async_sess_args_set(sess, iface, arg3, 0);
    141        
    142         return sess;
    143 }
    144 
    145 async_sess_t *service_connect_blocking_iface_extended(service_t service,
    146     iface_t iface, sysarg_t arg3)
     75async_sess_t *service_connect_blocking(service_t service, iface_t iface,
     76    sysarg_t arg3)
    14777{
    14878        async_exch_t *exch = async_exchange_begin(session_ns);
     
    16494}
    16595
    166 async_sess_t *service_connect_blocking(exch_mgmt_t mgmt, service_t service,
    167     sysarg_t arg3)
    168 {
    169         async_exch_t *exch = async_exchange_begin(session_ns);
    170         async_sess_t *sess =
    171             async_connect_me_to_blocking(mgmt, exch, 0, service, arg3);
    172         async_exchange_end(exch);
    173        
    174         if (!sess)
    175                 return NULL;
    176        
    177         /*
    178          * FIXME Ugly hack to work around limitation of implementing
    179          * parallel exchanges using multiple connections. Shift out
    180          * first argument for non-initial connections.
    181          */
    182         async_sess_args_set(sess, 0, arg3, 0);
    183        
    184         return sess;
    185 }
    186 
    187 /** Create bidirectional connection with a service
    188  *
    189  * @param[in] service         Service.
    190  * @param[in] arg1            First parameter.
    191  * @param[in] arg2            Second parameter.
    192  * @param[in] arg3            Third parameter.
    193  * @param[in] client_receiver Message receiver.
    194  *
    195  * @return Session to the service.
    196  * @return Other error codes as defined by async_connect_to_me().
    197  *
    198  */
    199 async_sess_t *service_bind(service_t service, sysarg_t arg1, sysarg_t arg2,
    200     sysarg_t arg3, async_port_handler_t client_receiver)
    201 {
    202         /* Connect to the needed service */
    203         async_sess_t *sess =
    204             service_connect_blocking(EXCHANGE_SERIALIZE, service, 0);
    205         if (sess != NULL) {
    206                 /* Request callback connection */
    207                 async_exch_t *exch = async_exchange_begin(sess);
    208                 int rc = async_connect_to_me(exch, arg1, arg2, arg3,
    209                     client_receiver, NULL);
    210                 async_exchange_end(exch);
    211                
    212                 if (rc != EOK) {
    213                         async_hangup(sess);
    214                         errno = rc;
    215                         return NULL;
    216                 }
    217         }
    218        
    219         return sess;
    220 }
    22196
    22297int ns_ping(void)
  • uspace/lib/c/generic/time.c

    r0dd16778 rf9b2cb4c  
    611611                        goto fallback;
    612612               
    613                 clock_conn = loc_service_connect(EXCHANGE_SERIALIZE,
    614                     svc_id, IPC_FLAG_BLOCKING);
     613                clock_conn = loc_service_connect(svc_id, INTERFACE_DDF,
     614                    IPC_FLAG_BLOCKING);
    615615                if (!clock_conn)
    616616                        goto fallback;
  • uspace/lib/c/generic/vfs/vfs.c

    r0dd16778 rf9b2cb4c  
    7575       
    7676        while (vfs_sess == NULL)
    77                 vfs_sess = service_connect_blocking(EXCHANGE_PARALLEL, SERVICE_VFS,
     77                vfs_sess = service_connect_blocking(SERVICE_VFS, INTERFACE_VFS,
    7878                    0);
    7979       
     
    796796}
    797797
    798 async_sess_t *fd_session(exch_mgmt_t mgmt, int fildes)
     798async_sess_t *fd_session(int fildes, iface_t iface)
    799799{
    800800        struct stat stat;
     
    810810        }
    811811       
    812         return loc_service_connect(mgmt, stat.service, 0);
     812        return loc_service_connect(stat.service, iface, 0);
    813813}
    814814
  • uspace/lib/c/include/async.h

    r0dd16778 rf9b2cb4c  
    5959 *
    6060 * @param callid ID of incoming call or 0 if connection initiated from
    61  *               inside using async_connect_to_me()
     61 *               inside using async_create_callback_port()
    6262 * @param call   Incoming call or 0 if connection initiated from inside
    63  * @param arg    Local argument passed from async_new_connection() or
    64  *               async_connect_to_me()
     63 *               using async_create_callback_port()
     64 * @param arg    Local argument.
     65 *
    6566 */
    6667typedef void (*async_port_handler_t)(ipc_callid_t, ipc_call_t *, void *);
     
    8283        EXCHANGE_ATOMIC = 0,
    8384       
     85        /** Exchange management via mutual exclusion
     86         *
     87         * Suitable for any kind of client/server communication,
     88         * but can limit parallelism.
     89         *
     90         */
     91        EXCHANGE_SERIALIZE = 1,
     92       
    8493        /** Exchange management via phone cloning
    8594         *
     
    8998         *
    9099         */
    91         EXCHANGE_PARALLEL = 1,
    92        
    93         /** Exchange management via mutual exclusion
    94          *
    95          * Suitable for any kind of client/server communication,
    96          * but can limit parallelism.
    97          *
    98          */
    99         EXCHANGE_SERIALIZE = 2
     100        EXCHANGE_PARALLEL = 2
    100101} exch_mgmt_t;
    101102
     
    358359extern async_sess_t *async_connect_kbox(task_id_t);
    359360
    360 extern int async_connect_to_me(async_exch_t *, sysarg_t, sysarg_t, sysarg_t,
    361     async_port_handler_t, void *);
     361extern int async_connect_to_me(async_exch_t *, sysarg_t, sysarg_t, sysarg_t);
    362362
    363363extern int async_hangup(async_sess_t *);
  • uspace/lib/c/include/devman.h

    r0dd16778 rf9b2cb4c  
    4242#include <stdbool.h>
    4343
    44 extern async_exch_t *devman_exchange_begin_blocking(devman_interface_t);
    45 extern async_exch_t *devman_exchange_begin(devman_interface_t);
     44extern async_exch_t *devman_exchange_begin_blocking(iface_t);
     45extern async_exch_t *devman_exchange_begin(iface_t);
    4646extern void devman_exchange_end(async_exch_t *);
    4747
     
    5353extern int devman_drv_fun_offline(devman_handle_t);
    5454
    55 extern async_sess_t *devman_device_connect(exch_mgmt_t, devman_handle_t,
    56     unsigned int);
    57 extern async_sess_t *devman_parent_device_connect(exch_mgmt_t, devman_handle_t,
     55extern async_sess_t *devman_device_connect(devman_handle_t, unsigned int);
     56extern async_sess_t *devman_parent_device_connect(devman_handle_t,
    5857    unsigned int);
    5958
  • uspace/lib/c/include/ipc/devman.h

    r0dd16778 rf9b2cb4c  
    141141
    142142typedef enum {
    143         DEVMAN_DRIVER = 1,
    144         DEVMAN_CLIENT,
    145         DEVMAN_CONNECT_TO_DEVICE,
    146         DEVMAN_CONNECT_TO_PARENTS_DEVICE
    147 } devman_interface_t;
    148 
    149 typedef enum {
    150143        DEVMAN_DRIVER_REGISTER = IPC_FIRST_USER_METHOD,
    151144        DEVMAN_ADD_FUNCTION,
  • uspace/lib/c/include/ipc/inet.h

    r0dd16778 rf9b2cb4c  
    3737
    3838#include <ipc/common.h>
    39 
    40 /** Inet ports */
    41 typedef enum {
    42         /** Default port */
    43         INET_PORT_DEFAULT = 1,
    44         /** Configuration port */
    45         INET_PORT_CFG,
    46         /** Ping service port */
    47         INET_PORT_PING,
    48         /** Ping6 service port */
    49         INET_PORT_PING6
    50 } inet_port_t;
    5139
    5240/** Requests on Inet default port */
  • uspace/lib/c/include/ipc/loc.h

    r0dd16778 rf9b2cb4c  
    7676} loc_event_t;
    7777
    78 /** Ports provided by location service.
    79  *
    80  * Every process that connects to loc must ask one of following
    81  * ports, otherwise connection will be refused.
    82  *
    83  */
    84 typedef enum {
    85         /** Service supplier (server) port */
    86         LOC_PORT_SUPPLIER = 1,
    87         /** Service consumer (client) port */
    88         LOC_PORT_CONSUMER,
    89         /** Create new connection to instance of device that
    90             is specified by second argument of call. */
    91         LOC_CONNECT_TO_SERVICE
    92 } loc_interface_t;
    93 
    9478typedef struct {
    9579        service_id_t id;
  • uspace/lib/c/include/ipc/logger.h

    r0dd16778 rf9b2cb4c  
    6969} logger_writer_request_t;
    7070
    71 typedef enum {
    72         /** Interface for controlling logger behavior. */
    73         LOGGER_INTERFACE_CONTROL,
    74         /** Interface for servers writing to the log. */
    75         LOGGER_INTERFACE_WRITER
    76 } logger_interface_t;
    77 
    7871#endif
    7972
  • uspace/lib/c/include/ipc/services.h

    r0dd16778 rf9b2cb4c  
    5252} service_t;
    5353
    54 #define SERVICE_NAME_CORECFG    "corecfg"
    55 #define SERVICE_NAME_DHCP       "net/dhcp"
    56 #define SERVICE_NAME_DNSR       "net/dnsr"
    57 #define SERVICE_NAME_INET       "net/inet"
    58 #define SERVICE_NAME_INETCFG    "net/inetcfg"
    59 #define SERVICE_NAME_INETPING   "net/inetping"
    60 #define SERVICE_NAME_INETPING6  "net/inetping6"
    61 #define SERVICE_NAME_NETCONF    "net/netconf"
    62 #define SERVICE_NAME_UDP        "net/udp"
    63 #define SERVICE_NAME_TCP        "net/tcp"
     54#define SERVICE_NAME_CORECFG  "corecfg"
     55#define SERVICE_NAME_DHCP     "net/dhcp"
     56#define SERVICE_NAME_DNSR     "net/dnsr"
     57#define SERVICE_NAME_INET     "net/inet"
     58#define SERVICE_NAME_NETCONF  "net/netconf"
     59#define SERVICE_NAME_UDP      "net/udp"
     60#define SERVICE_NAME_TCP      "net/tcp"
    6461
    6562#endif
  • uspace/lib/c/include/loc.h

    r0dd16778 rf9b2cb4c  
    4242typedef void (*loc_cat_change_cb_t)(void);
    4343
    44 extern async_exch_t *loc_exchange_begin_blocking(loc_interface_t);
    45 extern async_exch_t *loc_exchange_begin(loc_interface_t);
     44extern async_exch_t *loc_exchange_begin_blocking(iface_t);
     45extern async_exch_t *loc_exchange_begin(iface_t);
    4646extern void loc_exchange_end(async_exch_t *);
    4747
    4848extern int loc_server_register(const char *);
    4949extern int loc_service_register(const char *, service_id_t *);
    50 extern int loc_service_register_with_iface(const char *, service_id_t *,
    51     sysarg_t);
    5250extern int loc_service_unregister(service_id_t);
    5351extern int loc_service_add_to_cat(service_id_t, category_id_t);
     
    6563extern loc_object_type_t loc_id_probe(service_id_t);
    6664
    67 extern async_sess_t *loc_service_connect_iface(service_id_t, iface_t,
    68     unsigned int);
    69 extern async_sess_t *loc_service_connect(exch_mgmt_t, service_id_t,
     65extern async_sess_t *loc_service_connect(service_id_t, iface_t,
    7066    unsigned int);
    7167
  • uspace/lib/c/include/ns.h

    r0dd16778 rf9b2cb4c  
    4242
    4343extern int service_register(service_t);
    44 extern async_sess_t *service_connect(exch_mgmt_t, service_t, sysarg_t);
    45 extern async_sess_t *service_connect_iface_extended(service_t, iface_t, sysarg_t);
    46 extern async_sess_t *service_connect_iface(exch_mgmt_t, sysarg_t, service_t, sysarg_t);
    47 extern async_sess_t *service_connect_blocking(exch_mgmt_t, service_t, sysarg_t);
    48 extern async_sess_t *service_connect_blocking_iface_extended(service_t, iface_t,
    49     sysarg_t);
    50 extern async_sess_t *service_connect_blocking_iface(exch_mgmt_t, sysarg_t, service_t,
    51     sysarg_t);
    52 extern async_sess_t *service_bind(service_t, sysarg_t, sysarg_t, sysarg_t,
    53     async_port_handler_t);
     44extern async_sess_t *service_connect(service_t, iface_t, sysarg_t);
     45extern async_sess_t *service_connect_blocking(service_t, iface_t, sysarg_t);
    5446
    5547extern int ns_ping(void);
  • uspace/lib/c/include/vfs/vfs_sess.h

    r0dd16778 rf9b2cb4c  
    3939#include <stdio.h>
    4040
    41 extern async_sess_t *fd_session(exch_mgmt_t, int);
    42 extern async_sess_t *fsession(exch_mgmt_t, FILE *);
     41extern async_sess_t *fd_session(int, iface_t);
     42extern async_sess_t *fsession(FILE *, iface_t);
    4343
    4444#endif
Note: See TracChangeset for help on using the changeset viewer.