Changeset cdbcf14 in mainline for uspace/lib/c/generic/ipc.c


Ignore:
Timestamp:
2012-12-04T17:36:30Z (11 years ago)
Author:
Adam Hraska <adam.hraska+hos@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
52d2603
Parents:
6c1bb0d
Message:

Converted ipc semaphore futex to a lock futex.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/ipc.c

    r6c1bb0d rcdbcf14  
    136136        if (!call) {
    137137                /* Nothing to do regardless if failed or not */
    138                 futex_up(&ipc_futex);
     138                futex_unlock(&ipc_futex);
    139139                return;
    140140        }
    141141       
    142142        if (callid == (ipc_callid_t) IPC_CALLRET_FATAL) {
    143                 futex_up(&ipc_futex);
     143                futex_unlock(&ipc_futex);
    144144               
    145145                /* Call asynchronous handler with error code */
     
    152152       
    153153        if (callid == (ipc_callid_t) IPC_CALLRET_TEMPORARY) {
    154                 futex_up(&ipc_futex);
     154                futex_unlock(&ipc_futex);
    155155               
    156156                call->u.msg.phoneid = phoneid;
     
    175175        /* Add call to the list of dispatched calls */
    176176        list_append(&call->list, &dispatched_calls);
    177         futex_up(&ipc_futex);
     177        futex_unlock(&ipc_futex);
    178178}
    179179
     
    219219         */
    220220       
    221         futex_down(&ipc_futex);
     221        futex_lock(&ipc_futex);
    222222        ipc_callid_t callid = __SYSCALL6(SYS_IPC_CALL_ASYNC_FAST, phoneid,
    223223            imethod, arg1, arg2, arg3, arg4);
     
    289289         */
    290290       
    291         futex_down(&ipc_futex);
     291        futex_lock(&ipc_futex);
    292292        ipc_callid_t callid =
    293293            ipc_call_async_internal(phoneid, &call->u.msg.data);
     
    384384                        call->u.callid = callid;
    385385                       
    386                         futex_down(&ipc_futex);
     386                        futex_lock(&ipc_futex);
    387387                        list_append(&call->list, &dispatched_calls);
    388                         futex_up(&ipc_futex);
     388                        futex_unlock(&ipc_futex);
    389389                }
    390390               
     
    412412        callid &= ~IPC_CALLID_ANSWERED;
    413413       
    414         futex_down(&ipc_futex);
     414        futex_lock(&ipc_futex);
    415415       
    416416        link_t *item;
     
    423423                        list_remove(&call->list);
    424424                       
    425                         futex_up(&ipc_futex);
     425                        futex_unlock(&ipc_futex);
    426426                       
    427427                        if (call->callback)
     
    434434        }
    435435       
    436         futex_up(&ipc_futex);
     436        futex_unlock(&ipc_futex);
    437437}
    438438
Note: See TracChangeset for help on using the changeset viewer.