Subversion Repositories HelenOS

Rev

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

Rev 1336 Rev 1343
Line 145... Line 145...
145
    /* Add call to list of dispatched calls */
145
    /* Add call to list of dispatched calls */
146
    list_append(&call->list, &dispatched_calls);
146
    list_append(&call->list, &dispatched_calls);
147
}
147
}
148
 
148
 
149
 
149
 
150
/** Send answer to a received call */
150
/** Send a fast answer to a received call.
-
 
151
 *
-
 
152
 * The fast answer makes use of passing retval and first two arguments in registers.
-
 
153
 * If you need to return more, use the ipc_answer() instead.
-
 
154
 *
-
 
155
 * @param callid ID of the call being answered.
-
 
156
 * @param retval Return value.
-
 
157
 * @param arg1 First return argument.
-
 
158
 * @param arg2 Second return argument.
-
 
159
 *
-
 
160
 * @return Zero on success or a value from @ref errno.h on failure.
-
 
161
 */
151
ipcarg_t ipc_answer(ipc_callid_t callid, ipcarg_t retval, ipcarg_t arg1,
162
ipcarg_t ipc_answer_fast(ipc_callid_t callid, ipcarg_t retval, ipcarg_t arg1,
152
        ipcarg_t arg2)
163
        ipcarg_t arg2)
153
{
164
{
154
    return __SYSCALL4(SYS_IPC_ANSWER_FAST, callid, retval, arg1, arg2);
165
    return __SYSCALL4(SYS_IPC_ANSWER_FAST, callid, retval, arg1, arg2);
155
}
166
}
156
 
167
 
-
 
168
/** Send a full answer to a received call.
-
 
169
 *
-
 
170
 * @param callid ID of the call being answered.
-
 
171
 * @param call Call data. Must be already initialized by the responder.
-
 
172
 *
-
 
173
 * @return Zero on success or a value from @ref errno.h on failure.
-
 
174
 */
-
 
175
ipcarg_t ipc_answer(ipc_callid_t callid, ipc_call_t *call)
-
 
176
{
-
 
177
    return __SYSCALL2(SYS_IPC_ANSWER, callid, (sysarg_t) call);
-
 
178
}
-
 
179
 
-
 
180
 
157
/** Try to dispatch queed calls from async queue */
181
/** Try to dispatch queed calls from async queue */
158
static void try_dispatch_queued_calls(void)
182
static void try_dispatch_queued_calls(void)
159
{
183
{
160
    async_call_t *call;
184
    async_call_t *call;
161
    ipc_callid_t callid;
185
    ipc_callid_t callid;