Changeset 1a23f6e in mainline for uspace/lib/c/generic/ns.c
- Timestamp:
- 2012-05-04T10:41:44Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- af42a2b
- Parents:
- 6efb4d2 (diff), d21e935c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/ns.c
r6efb4d2 r1a23f6e 37 37 #include <async.h> 38 38 #include <macros.h> 39 #include <errno.h> 39 40 #include "private/ns.h" 40 41 … … 48 49 } 49 50 50 async_sess_t *service_connect(exch_mgmt_t mgmt, s ysarg_t service, sysarg_t arg2,51 async_sess_t *service_connect(exch_mgmt_t mgmt, services_t service, sysarg_t arg2, 51 52 sysarg_t arg3) 52 53 { … … 72 73 } 73 74 74 async_sess_t *service_connect_blocking(exch_mgmt_t mgmt, s ysarg_t service,75 async_sess_t *service_connect_blocking(exch_mgmt_t mgmt, services_t service, 75 76 sysarg_t arg2, sysarg_t arg3) 76 77 { … … 81 82 async_connect_me_to_blocking(mgmt, exch, service, arg2, arg3); 82 83 async_exchange_end(exch); 83 84 84 85 if (!sess) 85 86 return NULL; … … 91 92 */ 92 93 async_sess_args_set(sess, arg2, arg3, 0); 94 95 return sess; 96 } 97 98 /** Create bidirectional connection with a service 99 * 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 } 93 129 94 130 return sess;
Note:
See TracChangeset
for help on using the changeset viewer.