Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 1751 → Rev 1750

/uspace/trunk/console/gcons.c
229,7 → 229,7
vp_switch(0);
}
 
/** Return x, where left <= x <= right && |a-x|==min(|a-x|) is smallest */
 
static inline int limit(int a,int left, int right)
{
if (a < left)
/uspace/trunk/libc/generic/ipc.c
149,11 → 149,6
static inline void ipc_finish_async(ipc_callid_t callid, int phoneid,
async_call_t *call, int can_preempt)
{
if (!call) { /* Nothing to do regardless if failed or not */
futex_up(&ipc_futex);
return;
}
 
if (callid == IPC_CALLRET_FATAL) {
futex_up(&ipc_futex);
/* Call asynchronous handler with error code */
197,14 → 192,12
ipcarg_t arg2, void *private,
ipc_async_callback_t callback, int can_preempt)
{
async_call_t *call = NULL;
async_call_t *call;
ipc_callid_t callid;
 
if (callback) {
call = ipc_prepare_async(private, callback);
if (!call)
return;
}
call = ipc_prepare_async(private, callback);
if (!call)
return;
 
/* We need to make sure that we get callid before
* another thread accesses the queue again */
212,11 → 205,6
callid = __SYSCALL4(SYS_IPC_CALL_ASYNC_FAST, phoneid, method, arg1, arg2);
 
if (callid == IPC_CALLRET_TEMPORARY) {
if (!call) {
call = ipc_prepare_async(private, callback);
if (!call)
return;
}
IPC_SET_METHOD(call->u.msg.data, method);
IPC_SET_ARG1(call->u.msg.data, arg1);
IPC_SET_ARG2(call->u.msg.data, arg2);
354,7 → 342,7
}
}
futex_up(&ipc_futex);
/* We may get here after async_msg, which doesn't register any callback */
printf("Received unidentified answer: %P!!!\n", callid);
}