Subversion Repositories HelenOS-historic

Rev

Rev 1757 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1757 Rev 1780
Line 59... Line 59...
59
static slab_cache_t *ipc_call_slab;
59
static slab_cache_t *ipc_call_slab;
60
 
60
 
61
/* Initialize new call */
61
/* Initialize new call */
62
static void _ipc_call_init(call_t *call)
62
static void _ipc_call_init(call_t *call)
63
{
63
{
64
    memsetb((__address)call, sizeof(*call), 0);
64
    memsetb((uintptr_t)call, sizeof(*call), 0);
65
    call->callerbox = &TASK->answerbox;
65
    call->callerbox = &TASK->answerbox;
66
    call->sender = TASK;
66
    call->sender = TASK;
67
}
67
}
68
 
68
 
69
/** Allocate & initialize call structure
69
/** Allocate & initialize call structure
Line 183... Line 183...
183
/** Simulate sending back a message
183
/** Simulate sending back a message
184
 *
184
 *
185
 * Most errors are better handled by forming a normal backward
185
 * Most errors are better handled by forming a normal backward
186
 * message and sending it as a normal answer.
186
 * message and sending it as a normal answer.
187
 */
187
 */
188
void ipc_backsend_err(phone_t *phone, call_t *call, __native err)
188
void ipc_backsend_err(phone_t *phone, call_t *call, unative_t err)
189
{
189
{
190
    call->data.phone = phone;
190
    call->data.phone = phone;
191
    atomic_inc(&phone->active_calls);
191
    atomic_inc(&phone->active_calls);
192
    IPC_SET_RETVAL(call->data, err);
192
    IPC_SET_RETVAL(call->data, err);
193
    _ipc_answer_free_call(call);
193
    _ipc_answer_free_call(call);
Line 306... Line 306...
306
 * @param flags Select mode of sleep operation. See documentation for waitq_sleep_timeout()i
306
 * @param flags Select mode of sleep operation. See documentation for waitq_sleep_timeout()i
307
 *      for description of its special meaning.
307
 *      for description of its special meaning.
308
 * @return Recived message address
308
 * @return Recived message address
309
 * - to distinguish between call and answer, look at call->flags
309
 * - to distinguish between call and answer, look at call->flags
310
 */
310
 */
311
call_t * ipc_wait_for_call(answerbox_t *box, __u32 usec, int flags)
311
call_t * ipc_wait_for_call(answerbox_t *box, uint32_t usec, int flags)
312
{
312
{
313
    call_t *request;
313
    call_t *request;
314
    ipl_t ipl;
314
    ipl_t ipl;
315
    int rc;
315
    int rc;
316
 
316