Subversion Repositories HelenOS-historic

Rev

Rev 1536 | Rev 1610 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1536 Rev 1547
Line 621... Line 621...
621
    ipc_call_async_2(phoneid,method,arg1,arg2,msg,reply_received,1);
621
    ipc_call_async_2(phoneid,method,arg1,arg2,msg,reply_received,1);
622
 
622
 
623
    return (aid_t) msg;
623
    return (aid_t) msg;
624
}
624
}
625
 
625
 
-
 
626
/** Send message and return id of the sent message
-
 
627
 *
-
 
628
 * The return value can be used as input for async_wait() to wait
-
 
629
 * for completion.
-
 
630
 */
-
 
631
aid_t async_send_3(int phoneid, ipcarg_t method, ipcarg_t arg1, ipcarg_t arg2,
-
 
632
           ipcarg_t arg3, ipc_call_t *dataptr)
-
 
633
{
-
 
634
    amsg_t *msg;
-
 
635
 
-
 
636
    msg = malloc(sizeof(*msg));
-
 
637
    msg->done = 0;
-
 
638
    msg->dataptr = dataptr;
-
 
639
 
-
 
640
    msg->wdata.active = 1; /* We may sleep in next method, but it
-
 
641
                * will use it's own mechanism */
-
 
642
    ipc_call_async_3(phoneid,method,arg1,arg2,arg3, msg,reply_received,1);
-
 
643
 
-
 
644
    return (aid_t) msg;
-
 
645
}
-
 
646
 
626
/** Wait for a message sent by async framework
647
/** Wait for a message sent by async framework
627
 *
648
 *
628
 * @param amsgid Message ID to wait for
649
 * @param amsgid Message ID to wait for
629
 * @param retval Pointer to variable where will be stored retval
650
 * @param retval Pointer to variable where will be stored retval
630
 *               of the answered message. If NULL, it is ignored.
651
 *               of the answered message. If NULL, it is ignored.