Changeset 38c706cc in mainline


Ignore:
Timestamp:
2007-12-04T19:54:53Z (17 years ago)
Author:
Josef Cejka <malyzelenyhnus@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6364d3c
Parents:
90c35436
Message:

Extended IPC_M_CONNECT_TO_ME to use 3 user defined parameters.
Phone identifier is passed in ARG5.

Files:
18 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/ipc/ipc.h

    r90c35436 r38c706cc  
    126126 *                       the call is accepted and the response is sent back.
    127127 *                     - the allocated phoneid is passed to userspace
    128  *                       (on the receiving side) as ARG3 of the call.
     128 *                       (on the receiving side) as ARG5 of the call.
    129129 *                     - the caller obtains taskid of the called thread
    130130 */
  • kernel/generic/src/ipc/ipc.c

    r90c35436 r38c706cc  
    569569                call = list_get_instance(tmp, call_t, link);
    570570                printf("Callid: %p Srctask:%llu M:%d A1:%d A2:%d A3:%d "
    571                     "Flags:%x\n", call, call->sender->taskid,
     571                    "A4:%d A5:%d Flags:%x\n", call, call->sender->taskid,
    572572                    IPC_GET_METHOD(call->data), IPC_GET_ARG1(call->data),
    573573                    IPC_GET_ARG2(call->data), IPC_GET_ARG3(call->data),
     574                    IPC_GET_ARG4(call->data), IPC_GET_ARG5(call->data),
    574575                    call->flags);
    575576        }
     
    581582                call = list_get_instance(tmp, call_t, link);
    582583                printf("Callid: %p Srctask:%llu M:%d A1:%d A2:%d A3:%d "
    583                     "Flags:%x\n", call, call->sender->taskid,
     584                    "A4:%d A5:%d Flags:%x\n", call, call->sender->taskid,
    584585                    IPC_GET_METHOD(call->data), IPC_GET_ARG1(call->data),
    585586                    IPC_GET_ARG2(call->data), IPC_GET_ARG3(call->data),
     587                    IPC_GET_ARG4(call->data), IPC_GET_ARG5(call->data),
    586588                    call->flags);
    587589        }
     
    591593            tmp = tmp->next) {
    592594                call = list_get_instance(tmp, call_t, link);
    593                 printf("Callid:%p M:%d A1:%d A2:%d A3:%d Flags:%x\n", call,
    594                     IPC_GET_METHOD(call->data), IPC_GET_ARG1(call->data),
     595                printf("Callid:%p M:%d A1:%d A2:%d A3:%d A4:%d A5:%d Flags:%x\n",
     596                    call, IPC_GET_METHOD(call->data), IPC_GET_ARG1(call->data),
    595597                    IPC_GET_ARG2(call->data), IPC_GET_ARG3(call->data),
     598                    IPC_GET_ARG4(call->data), IPC_GET_ARG5(call->data),
    596599                    call->flags);
    597600        }
  • kernel/generic/src/ipc/ipcrsc.c

    r90c35436 r38c706cc  
    7373 * *** Connect_me_to ***
    7474 * The caller sends IPC_M_CONNECT_ME_TO to an answerbox. The server receives
    75  * 'phoneid' of the connecting phone as an ARG3. If it answers with RETVAL=0,
     75 * 'phoneid' of the connecting phone as an ARG5. If it answers with RETVAL=0,
    7676 * the phonecall is accepted, otherwise it is refused.
    7777 *
  • kernel/generic/src/ipc/sysipc.c

    r90c35436 r38c706cc  
    178178
    179179        if (IPC_GET_METHOD(*olddata) == IPC_M_CONNECT_TO_ME) {
    180                 phoneid = IPC_GET_ARG3(*olddata);
     180                phoneid = IPC_GET_ARG5(*olddata);
    181181                if (IPC_GET_RETVAL(answer->data)) {
    182182                        /* The connection was not accepted */
     
    186186                        phone_connect(phoneid, &answer->sender->answerbox);
    187187                        /* Set 'phone hash' as arg3 of response */
    188                         IPC_SET_ARG3(answer->data,
     188                        IPC_SET_ARG5(answer->data,
    189189                            (unative_t) &TASK->phones[phoneid]);
    190190                }
     
    342342                        return -1;
    343343                }
    344                 IPC_SET_ARG3(call->data, phoneid);
     344                IPC_SET_ARG5(call->data, phoneid);
    345345        }
    346346        return 0;
  • uspace/app/tester/devmap/devmap1.c

    r90c35436 r38c706cc  
    9191        }
    9292/*     
    93  *      device_phone = (int) IPC_GET_ARG3(answer);
     93 *      device_phone = (int) IPC_GET_ARG5(answer);
    9494 */
    9595        printf("Connected to device.\n");
     
    150150        async_set_client_connection(driver_client_connection);
    151151
    152         ipc_connect_to_me(phone, 0, 0, &callback_phonehash);
     152        ipc_connect_to_me(phone, 0, 0, 0, &callback_phonehash);
    153153/*     
    154154        if (NULL == async_new_connection(callback_phonehash, 0, NULL,
  • uspace/app/tester/ipc/register.c

    r90c35436 r38c706cc  
    7878        for (i = IPC_TEST_START; i < IPC_TEST_START + 10; i++) {
    7979                ipcarg_t phonead;
    80                 int res = ipc_connect_to_me(PHONE_NS, i, 0, &phonead);
     80                int res = ipc_connect_to_me(PHONE_NS, i, 0, 0, &phonead);
    8181                if (!res)
    8282                        break;
  • uspace/lib/libc/generic/ipc.c

    r90c35436 r38c706cc  
    570570 * @param arg1          Service-defined argument.
    571571 * @param arg2          Service-defined argument.
     572 * @param arg3          Service-defined argument.
    572573 * @param phonehash     Storage where the library will store an opaque
    573574 *                      identifier of the phone that will be used for incoming
     
    577578 * @return              Zero on success or a negative error code.
    578579 */
    579 int ipc_connect_to_me(int phoneid, int arg1, int arg2, ipcarg_t *phonehash)
    580 {
    581         return ipc_call_sync_2_3(phoneid, IPC_M_CONNECT_TO_ME, arg1, arg2,
    582             NULL, NULL, phonehash);
     580int ipc_connect_to_me(int phoneid, int arg1, int arg2, int arg3,
     581    ipcarg_t *phonehash)
     582{
     583        return ipc_call_sync_3_5(phoneid, IPC_M_CONNECT_TO_ME, arg1, arg2,
     584            arg3, NULL, NULL, NULL, NULL, phonehash);
    583585}
    584586
  • uspace/lib/libc/include/ipc/ipc.h

    r90c35436 r38c706cc  
    253253    ipc_async_callback_t callback, int can_preempt);
    254254
    255 extern int ipc_connect_to_me(int phoneid, int arg1, int arg2, ipcarg_t *phone);
     255extern int ipc_connect_to_me(int phoneid, int arg1, int arg2, int arg3,
     256    ipcarg_t *phone);
    256257extern int ipc_connect_me_to(int phoneid, int arg1, int arg2, int arg3);
    257258extern int ipc_hangup(int phoneid);
  • uspace/srv/console/console.c

    r90c35436 r38c706cc  
    382382        async_serialize_start();
    383383        gcons_notify_connect(consnum);
    384         conn->client_phone = IPC_GET_ARG3(call);
     384        conn->client_phone = IPC_GET_ARG5(*icall);
    385385        screenbuffer_clear(&conn->screenbuffer);
    386386       
     
    489489        }
    490490       
    491         if (ipc_connect_to_me(kbd_phone, SERVICE_CONSOLE, 0, &phonehash) != 0)
     491        if (ipc_connect_to_me(kbd_phone, SERVICE_CONSOLE, 0, 0, &phonehash) != 0)
    492492                return -1;
    493493        async_new_connection(phonehash, 0, NULL, keyboard_events);
     
    551551
    552552        /* Register at NS */
    553         if (ipc_connect_to_me(PHONE_NS, SERVICE_CONSOLE, 0, &phonehash) != 0) {
     553        if (ipc_connect_to_me(PHONE_NS, SERVICE_CONSOLE, 0, 0, &phonehash) != 0) {
    554554                return -1;
    555555        }
  • uspace/srv/devmap/devmap.c

    r90c35436 r38c706cc  
    270270        }
    271271
    272         driver->phone = IPC_GET_ARG3(call);
     272        driver->phone = IPC_GET_ARG5(call);
    273273       
    274274        ipc_answer_0(callid, EOK);
     
    736736
    737737        /* Register device mapper at naming service */
    738         if (ipc_connect_to_me(PHONE_NS, SERVICE_DEVMAP, 0, &phonead) != 0)
     738        if (ipc_connect_to_me(PHONE_NS, SERVICE_DEVMAP, 0, 0, &phonead) != 0)
    739739                return -1;
    740740       
  • uspace/srv/fb/main.c

    r90c35436 r38c706cc  
    7373                sysio_init();
    7474
    75         if (ipc_connect_to_me(PHONE_NS, SERVICE_VIDEO, 0, &phonead) != 0)
     75        if (ipc_connect_to_me(PHONE_NS, SERVICE_VIDEO, 0, 0, &phonead) != 0)
    7676                return -1;
    7777       
  • uspace/srv/fs/fat/fat.c

    r90c35436 r38c706cc  
    154154         */
    155155        ipcarg_t phonehash;
    156         ipc_connect_to_me(vfs_phone, 0, 0, &phonehash);
     156        ipc_connect_to_me(vfs_phone, 0, 0, 0, &phonehash);
    157157
    158158        /*
  • uspace/srv/kbd/generic/kbd.c

    r90c35436 r38c706cc  
    109109                                break;
    110110                        }
    111                         phone2cons = IPC_GET_ARG3(call);
     111                        phone2cons = IPC_GET_ARG5(call);
    112112                        retval = 0;
    113113                        break;
     
    134134        async_set_interrupt_received(irq_handler);
    135135        /* Register service at nameserver */
    136         if (ipc_connect_to_me(PHONE_NS, SERVICE_KEYBOARD, 0, &phonead) != 0)
     136        if (ipc_connect_to_me(PHONE_NS, SERVICE_KEYBOARD, 0, 0, &phonead) != 0)
    137137                return -1;
    138138
  • uspace/srv/ns/ns.c

    r90c35436 r38c706cc  
    140140                         */
    141141                        retval = register_service(IPC_GET_ARG1(call),
    142                             IPC_GET_ARG3(call), &call);
     142                            IPC_GET_ARG5(call), &call);
    143143                        break;
    144144                case IPC_M_CONNECT_ME_TO:
  • uspace/srv/pci/pci.c

    r90c35436 r38c706cc  
    5858
    5959        printf("%s: registering at naming service.\n", NAME);
    60         if (ipc_connect_to_me(PHONE_NS, SERVICE_PCI, 0, &ns_in_phone_hash) != 0) {
     60        if (ipc_connect_to_me(PHONE_NS, SERVICE_PCI, 0, 0, &ns_in_phone_hash) != 0) {
    6161                printf("Failed to register %s at naming service.\n", NAME);
    6262                return -1;
  • uspace/srv/rd/rd.c

    r90c35436 r38c706cc  
    212212               
    213213                /* Register service at nameserver */
    214                 if (ipc_connect_to_me(PHONE_NS, SERVICE_RD, 0, &phonead) != 0)
     214                if (ipc_connect_to_me(PHONE_NS, SERVICE_RD, 0, 0, &phonead) != 0)
    215215                        return -1;
    216216               
  • uspace/srv/vfs/vfs.c

    r90c35436 r38c706cc  
    158158         * Register at the naming service.
    159159         */
    160         ipc_connect_to_me(PHONE_NS, SERVICE_VFS, 0, &phonead);
     160        ipc_connect_to_me(PHONE_NS, SERVICE_VFS, 0, 0, &phonead);
    161161
    162162        /*
  • uspace/srv/vfs/vfs_register.c

    r90c35436 r38c706cc  
    253253                return;
    254254        }
    255         fs_info->phone = IPC_GET_ARG3(call);
     255        fs_info->phone = IPC_GET_ARG5(call);
    256256        ipc_answer_0(callid, EOK);
    257257
Note: See TracChangeset for help on using the changeset viewer.