Changes in uspace/lib/c/generic/ipc.c [52d2603:d7978525] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/ipc.c
r52d2603 rd7978525 81 81 LIST_INITIALIZE(queued_calls); 82 82 83 static futex_t ipc_futex = FUTEX_INITIALIZER;83 static atomic_t ipc_futex = FUTEX_INITIALIZER; 84 84 85 85 /** Send asynchronous message via syscall. … … 136 136 if (!call) { 137 137 /* Nothing to do regardless if failed or not */ 138 futex_u nlock(&ipc_futex);138 futex_up(&ipc_futex); 139 139 return; 140 140 } 141 141 142 142 if (callid == (ipc_callid_t) IPC_CALLRET_FATAL) { 143 futex_u nlock(&ipc_futex);143 futex_up(&ipc_futex); 144 144 145 145 /* Call asynchronous handler with error code */ … … 152 152 153 153 if (callid == (ipc_callid_t) IPC_CALLRET_TEMPORARY) { 154 futex_u nlock(&ipc_futex);154 futex_up(&ipc_futex); 155 155 156 156 call->u.msg.phoneid = phoneid; … … 175 175 /* Add call to the list of dispatched calls */ 176 176 list_append(&call->list, &dispatched_calls); 177 futex_u nlock(&ipc_futex);177 futex_up(&ipc_futex); 178 178 } 179 179 … … 219 219 */ 220 220 221 futex_ lock(&ipc_futex);221 futex_down(&ipc_futex); 222 222 ipc_callid_t callid = __SYSCALL6(SYS_IPC_CALL_ASYNC_FAST, phoneid, 223 223 imethod, arg1, arg2, arg3, arg4); … … 226 226 if (!call) { 227 227 call = ipc_prepare_async(private, callback); 228 if (!call) { 229 futex_unlock(&ipc_futex); 228 if (!call) 230 229 return; 231 }232 230 } 233 231 … … 291 289 */ 292 290 293 futex_ lock(&ipc_futex);291 futex_down(&ipc_futex); 294 292 ipc_callid_t callid = 295 293 ipc_call_async_internal(phoneid, &call->u.msg.data); … … 386 384 call->u.callid = callid; 387 385 388 futex_ lock(&ipc_futex);386 futex_down(&ipc_futex); 389 387 list_append(&call->list, &dispatched_calls); 390 futex_u nlock(&ipc_futex);388 futex_up(&ipc_futex); 391 389 } 392 390 … … 414 412 callid &= ~IPC_CALLID_ANSWERED; 415 413 416 futex_ lock(&ipc_futex);414 futex_down(&ipc_futex); 417 415 418 416 link_t *item; … … 425 423 list_remove(&call->list); 426 424 427 futex_u nlock(&ipc_futex);425 futex_up(&ipc_futex); 428 426 429 427 if (call->callback) … … 436 434 } 437 435 438 futex_u nlock(&ipc_futex);436 futex_up(&ipc_futex); 439 437 } 440 438
Note:
See TracChangeset
for help on using the changeset viewer.