Changeset a35b458 in mainline for uspace/lib/c/generic/ns.c
- Timestamp:
- 2018-03-02T20:10:49Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f1380b7
- Parents:
- 3061bc1
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:38:31)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:10:49)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/ns.c
r3061bc1 ra35b458 50 50 errno_t retval; 51 51 ipc_call_t answer; 52 52 53 53 async_sess_t *sess = ns_session_get(); 54 54 if (sess == NULL) 55 55 return EIO; 56 56 57 57 async_exch_t *exch = async_exchange_begin(sess); 58 58 aid_t req = async_send_1(exch, NS_REGISTER, service, &answer); 59 59 errno_t rc = async_connect_to_me(exch, 0, service, 0); 60 60 61 61 async_exchange_end(exch); 62 62 63 63 if (rc != EOK) { 64 64 async_forget(req); 65 65 return rc; 66 66 } 67 67 68 68 async_wait_for(req, &retval); 69 69 return rc; … … 75 75 if (sess == NULL) 76 76 return NULL; 77 77 78 78 async_exch_t *exch = async_exchange_begin(sess); 79 79 if (exch == NULL) 80 80 return NULL; 81 81 82 82 async_sess_t *csess = 83 83 async_connect_me_to_iface(exch, iface, service, arg3); 84 84 async_exchange_end(exch); 85 85 86 86 if (csess == NULL) 87 87 return NULL; 88 88 89 89 /* 90 90 * FIXME Ugly hack to work around limitation of implementing … … 93 93 */ 94 94 async_sess_args_set(csess, iface, arg3, 0); 95 95 96 96 return csess; 97 97 } … … 103 103 if (sess == NULL) 104 104 return NULL; 105 105 106 106 async_exch_t *exch = async_exchange_begin(sess); 107 107 async_sess_t *csess = 108 108 async_connect_me_to_blocking_iface(exch, iface, service, arg3); 109 109 async_exchange_end(exch); 110 110 111 111 if (csess == NULL) 112 112 return NULL; 113 113 114 114 /* 115 115 * FIXME Ugly hack to work around limitation of implementing … … 118 118 */ 119 119 async_sess_args_set(csess, iface, arg3, 0); 120 120 121 121 return csess; 122 122 } … … 128 128 if (sess == NULL) 129 129 return EIO; 130 130 131 131 async_exch_t *exch = async_exchange_begin(sess); 132 132 errno_t rc = async_req_0_0(exch, NS_PING); 133 133 async_exchange_end(exch); 134 134 135 135 return rc; 136 136 } … … 142 142 if (sess == NULL) 143 143 return EIO; 144 144 145 145 exch = async_exchange_begin(sess); 146 146 errno_t rc = async_req_2_0(exch, NS_ID_INTRO, LOWER32(id), UPPER32(id)); 147 147 async_exchange_end(exch); 148 148 149 149 return rc; 150 150 } … … 153 153 { 154 154 async_exch_t *exch; 155 155 156 156 if (sess_ns == NULL) { 157 157 exch = async_exchange_begin(session_ns); … … 161 161 return NULL; 162 162 } 163 163 164 164 return sess_ns; 165 165 }
Note:
See TracChangeset
for help on using the changeset viewer.