Changes in uspace/lib/c/generic/ns.c [b1bd89ea:f51b1d3] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/ns.c
rb1bd89ea rf51b1d3 37 37 #include <async.h> 38 38 #include <macros.h> 39 #include <errno.h>40 39 #include "private/ns.h" 41 40 … … 49 48 } 50 49 51 async_sess_t *service_connect(exch_mgmt_t mgmt, s ervices_t service, sysarg_t arg2,50 async_sess_t *service_connect(exch_mgmt_t mgmt, sysarg_t service, sysarg_t arg2, 52 51 sysarg_t arg3) 53 52 { … … 73 72 } 74 73 75 async_sess_t *service_connect_blocking(exch_mgmt_t mgmt, s ervices_t service,74 async_sess_t *service_connect_blocking(exch_mgmt_t mgmt, sysarg_t service, 76 75 sysarg_t arg2, sysarg_t arg3) 77 76 { … … 82 81 async_connect_me_to_blocking(mgmt, exch, service, arg2, arg3); 83 82 async_exchange_end(exch); 84 83 85 84 if (!sess) 86 85 return NULL; … … 92 91 */ 93 92 async_sess_args_set(sess, arg2, arg3, 0); 94 95 return sess;96 }97 98 /** Create bidirectional connection with a service99 *100 * @param[in] service Service.101 * @param[in] arg1 First parameter.102 * @param[in] arg2 Second parameter.103 * @param[in] arg3 Third parameter.104 * @param[in] client_receiver Message receiver.105 *106 * @return Session to the service.107 * @return Other error codes as defined by async_connect_to_me().108 *109 */110 async_sess_t *service_bind(services_t service, sysarg_t arg1, sysarg_t arg2,111 sysarg_t arg3, async_client_conn_t client_receiver)112 {113 /* Connect to the needed service */114 async_sess_t *sess =115 service_connect_blocking(EXCHANGE_SERIALIZE, service, 0, 0);116 if (sess != NULL) {117 /* Request callback connection */118 async_exch_t *exch = async_exchange_begin(sess);119 int rc = async_connect_to_me(exch, arg1, arg2, arg3,120 client_receiver, NULL);121 async_exchange_end(exch);122 123 if (rc != EOK) {124 async_hangup(sess);125 errno = rc;126 return NULL;127 }128 }129 93 130 94 return sess;
Note:
See TracChangeset
for help on using the changeset viewer.