Subversion Repositories HelenOS

Rev

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

Rev 3536 Rev 4377
Line 596... Line 596...
596
int ipc_connect_me_to(int phoneid, int arg1, int arg2, int arg3)
596
int ipc_connect_me_to(int phoneid, int arg1, int arg2, int arg3)
597
{
597
{
598
    ipcarg_t newphid;
598
    ipcarg_t newphid;
599
    int res;
599
    int res;
600
 
600
 
601
    res = ipc_call_sync_3_5(phoneid, IPC_M_CONNECT_ME_TO, arg1, arg2, arg3,
601
    res = ipc_call_sync_3_5(phoneid, IPC_M_CONNECT_ME_TO, arg1, arg2, arg3,
602
        NULL, NULL, NULL, NULL, &newphid);
602
        NULL, NULL, NULL, NULL, &newphid);
603
    if (res)
603
    if (res)
604
        return res;
604
        return res;
605
    return newphid;
605
    return newphid;
606
}
606
}
607
 
607
 
-
 
608
/** Ask through phone for a new connection to some service.
-
 
609
 *
-
 
610
 * If the connection is not available at the moment, the
-
 
611
 * call will block.
-
 
612
 *
-
 
613
 * @param phoneid   Phone handle used for contacting the other side.
-
 
614
 * @param arg1      User defined argument.
-
 
615
 * @param arg2      User defined argument.
-
 
616
 * @param arg3      User defined argument.
-
 
617
 *
-
 
618
 * @return      New phone handle on success or a negative error code.
-
 
619
 */
-
 
620
int ipc_connect_me_to_blocking(int phoneid, int arg1, int arg2, int arg3)
-
 
621
{
-
 
622
    ipcarg_t newphid;
-
 
623
    int res;
-
 
624
 
-
 
625
    res = ipc_call_sync_4_5(phoneid, IPC_M_CONNECT_ME_TO, arg1, arg2, arg3,
-
 
626
        IPC_FLAG_BLOCKING, NULL, NULL, NULL, NULL, &newphid);
-
 
627
    if (res)
-
 
628
        return res;
-
 
629
    return newphid;
-
 
630
}
-
 
631
 
608
/** Hang up a phone.
632
/** Hang up a phone.
609
 *
633
 *
610
 * @param phoneid   Handle of the phone to be hung up.
634
 * @param phoneid   Handle of the phone to be hung up.
611
 *
635
 *
612
 * @return      Zero on success or a negative error code.
636
 * @return      Zero on success or a negative error code.
Line 664... Line 688...
664
{
688
{
665
    return __SYSCALL6(SYS_IPC_FORWARD_FAST, callid, phoneid, method, arg1,
689
    return __SYSCALL6(SYS_IPC_FORWARD_FAST, callid, phoneid, method, arg1,
666
        arg2, mode);
690
        arg2, mode);
667
}
691
}
668
 
692
 
-
 
693
 
-
 
694
int ipc_forward_slow(ipc_callid_t callid, int phoneid, int method,
-
 
695
    ipcarg_t arg1, ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, ipcarg_t arg5,
-
 
696
    int mode)
-
 
697
{
-
 
698
    ipc_call_t data;
-
 
699
 
-
 
700
    IPC_SET_METHOD(data, method);
-
 
701
    IPC_SET_ARG1(data, arg1);
-
 
702
    IPC_SET_ARG2(data, arg2);
-
 
703
    IPC_SET_ARG3(data, arg3);
-
 
704
    IPC_SET_ARG4(data, arg4);
-
 
705
    IPC_SET_ARG5(data, arg5);
-
 
706
 
-
 
707
    return __SYSCALL3(SYS_IPC_FORWARD_SLOW, callid, (sysarg_t) &data, mode);
-
 
708
}
-
 
709
 
669
/** Wrapper for making IPC_M_SHARE_IN calls.
710
/** Wrapper for making IPC_M_SHARE_IN calls.
670
 *
711
 *
671
 * @param phoneid   Phone that will be used to contact the receiving side.
712
 * @param phoneid   Phone that will be used to contact the receiving side.
672
 * @param dst       Destination address space area base.
713
 * @param dst       Destination address space area base.
673
 * @param size      Size of the destination address space area.
714
 * @param size      Size of the destination address space area.