Subversion Repositories HelenOS-historic

Rev

Rev 1006 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1006 Rev 1028
Line 115... Line 115...
115
    ipc_callid_t callid;
115
    ipc_callid_t callid;
116
 
116
 
117
    call = malloc(sizeof(*call));
117
    call = malloc(sizeof(*call));
118
    if (!call) {
118
    if (!call) {
119
        callback(private, ENOMEM, NULL);
119
        callback(private, ENOMEM, NULL);
-
 
120
        return;
120
    }
121
    }
121
       
122
       
122
    callid = __SYSCALL4(SYS_IPC_CALL_ASYNC_FAST, phoneid, method, arg1, arg2);
123
    callid = __SYSCALL4(SYS_IPC_CALL_ASYNC_FAST, phoneid, method, arg1, arg2);
123
    if (callid == IPC_CALLRET_FATAL) {
124
    if (callid == IPC_CALLRET_FATAL) {
124
        /* Call asynchronous handler with error code */
125
        /* Call asynchronous handler with error code */
Line 219... Line 220...
219
 * - dispatch ASYNC reoutines in the background
220
 * - dispatch ASYNC reoutines in the background
220
 * @param data Space where the message is stored
221
 * @param data Space where the message is stored
221
 * @return Callid or 0 if nothing available and started with
222
 * @return Callid or 0 if nothing available and started with
222
 *         IPC_WAIT_NONBLOCKING
223
 *         IPC_WAIT_NONBLOCKING
223
 */
224
 */
224
int ipc_wait_for_call(ipc_call_t *call, int flags)
225
ipc_callid_t ipc_wait_for_call(ipc_call_t *call, int flags)
225
{
226
{
226
    ipc_callid_t callid;
227
    ipc_callid_t callid;
227
 
228
 
228
    do {
229
    do {
229
        try_dispatch_queued_calls();
230
        try_dispatch_queued_calls();
Line 234... Line 235...
234
            handle_answer(callid, &call->data);
235
            handle_answer(callid, &call->data);
235
    } while (callid & IPC_CALLID_ANSWERED);
236
    } while (callid & IPC_CALLID_ANSWERED);
236
 
237
 
237
    return callid;
238
    return callid;
238
}
239
}
-
 
240
 
-
 
241
/** Ask destination to do a callback connection */
-
 
242
int ipc_connect_to_me(int phoneid, int arg1, int arg2,
-
 
243
              unsigned long long *taskid)
-
 
244
{
-
 
245
    return __SYSCALL4(SYS_IPC_CONNECT_TO_ME, phoneid, arg1, arg2,
-
 
246
              (sysarg_t) taskid);
-
 
247
}