Changeset a99cbc1e in mainline
- Timestamp:
- 2017-12-08T21:03:35Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e172429
- Parents:
- c8211849
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2017-12-08 00:45:14)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2017-12-08 21:03:35)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/async.c
rc8211849 ra99cbc1e 2123 2123 2124 2124 static int async_connect_me_to_internal(int phone, sysarg_t arg1, sysarg_t arg2, 2125 sysarg_t arg3, sysarg_t arg4 )2125 sysarg_t arg3, sysarg_t arg4, int *out_phone) 2126 2126 { 2127 2127 ipc_call_t result; 2128 2129 // XXX: Workaround for GCC's inability to infer association between 2130 // rc == EOK and *out_phone being assigned. 2131 *out_phone = -1; 2128 2132 2129 2133 amsg_t *msg = amsg_create(); … … 2143 2147 return rc; 2144 2148 2145 return (int) IPC_GET_ARG5(result); 2149 *out_phone = (int) IPC_GET_ARG5(result); 2150 return EOK; 2146 2151 } 2147 2152 … … 2173 2178 } 2174 2179 2175 int phone = async_connect_me_to_internal(exch->phone, arg1, arg2, arg3, 2176 0); 2177 if (phone < 0) { 2178 errno = phone; 2180 int phone; 2181 int rc = async_connect_me_to_internal(exch->phone, arg1, arg2, arg3, 2182 0, &phone); 2183 if (rc != EOK) { 2184 errno = rc; 2179 2185 free(sess); 2180 2186 return NULL; … … 2225 2231 } 2226 2232 2227 int phone = async_connect_me_to_internal(exch->phone, iface, arg2, 2228 arg3, 0); 2229 if (phone < 0) { 2230 errno = phone; 2233 int phone; 2234 int rc = async_connect_me_to_internal(exch->phone, iface, arg2, 2235 arg3, 0, &phone); 2236 if (rc != EOK) { 2237 errno = rc; 2231 2238 free(sess); 2232 2239 return NULL; … … 2295 2302 } 2296 2303 2297 int phone = async_connect_me_to_internal(exch->phone, arg1, arg2, arg3, 2298 IPC_FLAG_BLOCKING); 2299 2300 if (phone < 0) { 2301 errno = phone; 2304 int phone; 2305 int rc = async_connect_me_to_internal(exch->phone, arg1, arg2, arg3, 2306 IPC_FLAG_BLOCKING, &phone); 2307 2308 if (rc != EOK) { 2309 errno = rc; 2302 2310 free(sess); 2303 2311 return NULL; … … 2348 2356 } 2349 2357 2350 int phone = async_connect_me_to_internal(exch->phone, iface, arg2, 2351 arg3, IPC_FLAG_BLOCKING); 2352 if (phone < 0) { 2353 errno = phone; 2358 int phone; 2359 int rc = async_connect_me_to_internal(exch->phone, iface, arg2, 2360 arg3, IPC_FLAG_BLOCKING, &phone); 2361 if (rc != EOK) { 2362 errno = rc; 2354 2363 free(sess); 2355 2364 return NULL; … … 2502 2511 } else if (mgmt == EXCHANGE_PARALLEL) { 2503 2512 int phone; 2513 int rc; 2504 2514 2505 2515 retry: … … 2507 2517 * Make a one-time attempt to connect a new data phone. 2508 2518 */ 2509 phone= async_connect_me_to_internal(sess->phone, sess->arg1,2510 sess->arg2, sess->arg3, 0 );2511 if ( phone >= 0) {2519 rc = async_connect_me_to_internal(sess->phone, sess->arg1, 2520 sess->arg2, sess->arg3, 0, &phone); 2521 if (rc == EOK) { 2512 2522 exch = (async_exch_t *) malloc(sizeof(async_exch_t)); 2513 2523 if (exch != NULL) {
Note:
See TracChangeset
for help on using the changeset viewer.