Changeset 124c061 in mainline


Ignore:
Timestamp:
2011-01-23T23:47:58Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
11bb813
Parents:
fdb9982c
Message:

ipc_connect_to_me() now takes one extra argument to store the client task hash.

Files:
29 edited

Legend:

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

    rfdb9982c r124c061  
    165165 *                       error is sent back to caller. Otherwise
    166166 *                       the call is accepted and the response is sent back.
    167  *                     - the allocated phoneid is passed to userspace
     167 *                     - the hash of the client task is passed to userspace
     168 *                       (on the receiving side) as ARG4 of the call.
     169 *                     - the hash of the allocated phone is passed to userspace
    168170 *                       (on the receiving side) as ARG5 of the call.
    169171 *
  • kernel/generic/src/ipc/sysipc.c

    rfdb9982c r124c061  
    248248                        /* The connection was accepted */
    249249                        phone_connect(phoneid, &answer->sender->answerbox);
     250                        /* Set 'task hash' as arg4 of response */
     251                        IPC_SET_ARG4(answer->data, (sysarg_t) TASK);
    250252                        /* Set 'phone hash' as arg5 of response */
    251253                        IPC_SET_ARG5(answer->data,
  • uspace/lib/c/generic/devman.c

    rfdb9982c r124c061  
    116116        async_set_client_connection(conn);
    117117       
    118         sysarg_t callback_phonehash;
    119         ipc_connect_to_me(phone, 0, 0, 0, &callback_phonehash);
     118        ipc_connect_to_me(phone, 0, 0, 0, NULL, NULL);
    120119        async_wait_for(req, &retval);
    121120       
  • uspace/lib/c/generic/devmap.c

    rfdb9982c r124c061  
    116116        async_set_client_connection(conn);
    117117       
    118         sysarg_t callback_phonehash;
    119         ipc_connect_to_me(phone, 0, 0, 0, &callback_phonehash);
     118        ipc_connect_to_me(phone, 0, 0, 0, NULL, NULL);
    120119        async_wait_for(req, &retval);
    121120       
  • uspace/lib/c/generic/ipc.c

    rfdb9982c r124c061  
    578578 * @param arg2          Service-defined argument.
    579579 * @param arg3          Service-defined argument.
    580  * @param phonehash     Storage where the library will store an opaque
     580 * @param taskhash      Storage where the kernel will store an opaque
     581 *                      identifier of the client task.
     582 * @param phonehash     Storage where the kernel will store an opaque
    581583 *                      identifier of the phone that will be used for incoming
    582584 *                      calls. This identifier can be used for connection
     
    586588 */
    587589int ipc_connect_to_me(int phoneid, int arg1, int arg2, int arg3,
    588     sysarg_t *phonehash)
     590    sysarg_t *taskhash, sysarg_t *phonehash)
    589591{
    590592        return ipc_call_sync_3_5(phoneid, IPC_M_CONNECT_TO_ME, arg1, arg2,
    591             arg3, NULL, NULL, NULL, NULL, phonehash);
     593            arg3, NULL, NULL, NULL, taskhash, phonehash);
    592594}
    593595
  • uspace/lib/c/generic/net/modules.c

    rfdb9982c r124c061  
    145145                sysarg_t phonehash;
    146146               
    147                 rc = ipc_connect_to_me(phone, arg1, arg2, arg3, &phonehash);
     147                rc = ipc_connect_to_me(phone, arg1, arg2, arg3, NULL,
     148                    &phonehash);
    148149                if (rc != EOK) {
    149150                        ipc_hangup(phone);
  • uspace/lib/c/include/ipc/ipc.h

    rfdb9982c r124c061  
    259259    sysarg_t, sysarg_t, void *, ipc_async_callback_t, int);
    260260
    261 extern int ipc_connect_to_me(int, int, int, int, sysarg_t *);
     261extern int ipc_connect_to_me(int, int, int, int, sysarg_t *, sysarg_t *);
    262262extern int ipc_connect_me_to(int, int, int, int);
    263263extern int ipc_connect_me_to_blocking(int, int, int, int);
  • uspace/lib/fs/libfs.c

    rfdb9982c r124c061  
    102102         * Ask VFS for callback connection.
    103103         */
    104         ipc_connect_to_me(vfs_phone, 0, 0, 0, &reg->vfs_phonehash);
     104        ipc_connect_to_me(vfs_phone, 0, 0, 0, NULL, &reg->vfs_phonehash);
    105105       
    106106        /*
  • uspace/lib/net/il/il_skel.c

    rfdb9982c r124c061  
    115115                goto out;
    116116       
    117         sysarg_t phonehash;
    118         rc = ipc_connect_to_me(PHONE_NS, service, 0, 0, &phonehash);
     117        rc = ipc_connect_to_me(PHONE_NS, service, 0, 0, NULL, NULL);
    119118        if (rc != EOK)
    120119                goto out;
  • uspace/lib/net/nil/nil_skel.c

    rfdb9982c r124c061  
    115115                goto out;
    116116       
    117         sysarg_t phonehash;
    118         rc = ipc_connect_to_me(PHONE_NS, service, 0, 0, &phonehash);
     117        rc = ipc_connect_to_me(PHONE_NS, service, 0, 0, NULL, NULL);
    119118        if (rc != EOK)
    120119                goto out;
  • uspace/lib/net/tl/tl_skel.c

    rfdb9982c r124c061  
    117117                goto out;
    118118       
    119         sysarg_t phonehash;
    120         rc = ipc_connect_to_me(PHONE_NS, service, 0, 0, &phonehash);
     119        rc = ipc_connect_to_me(PHONE_NS, service, 0, 0, NULL, NULL);
    121120        if (rc != EOK)
    122121                goto out;
  • uspace/srv/clip/clip.c

    rfdb9982c r124c061  
    183183        async_set_client_connection(clip_connection);
    184184       
    185         sysarg_t phonead;
    186         if (ipc_connect_to_me(PHONE_NS, SERVICE_CLIPBOARD, 0, 0, &phonead) != 0)
     185        if (ipc_connect_to_me(PHONE_NS, SERVICE_CLIPBOARD, 0, 0, NULL, NULL))
    187186                return -1;
    188187       
  • uspace/srv/devman/main.c

    rfdb9982c r124c061  
    586586
    587587        /* Register device manager at naming service. */
    588         sysarg_t phonead;
    589         if (ipc_connect_to_me(PHONE_NS, SERVICE_DEVMAN, 0, 0, &phonead) != 0)
     588        if (ipc_connect_to_me(PHONE_NS, SERVICE_DEVMAN, 0, 0, NULL, NULL) != 0)
    590589                return -1;
    591590
  • uspace/srv/devmap/devmap.c

    rfdb9982c r124c061  
    11501150       
    11511151        /* Register device mapper at naming service */
    1152         sysarg_t phonead;
    1153         if (ipc_connect_to_me(PHONE_NS, SERVICE_DEVMAP, 0, 0, &phonead) != 0)
     1152        if (ipc_connect_to_me(PHONE_NS, SERVICE_DEVMAP, 0, 0, NULL, NULL) != 0)
    11541153                return -1;
    11551154       
  • uspace/srv/hid/adb_mouse/adb_dev.c

    rfdb9982c r124c061  
    6969        /* NB: The callback connection is slotted for removal */
    7070        sysarg_t phonehash;
    71         if (ipc_connect_to_me(dev_phone, 0, 0, 0, &phonehash) != 0) {
     71        if (ipc_connect_to_me(dev_phone, 0, 0, 0, NULL, &phonehash) != 0) {
    7272                printf(NAME ": Failed to create callback from device\n");
    7373                return false;
  • uspace/srv/hid/char_mouse/chardev.c

    rfdb9982c r124c061  
    7171        /* NB: The callback connection is slotted for removal */
    7272        sysarg_t phonehash;
    73         if (ipc_connect_to_me(dev_phone, 0, 0, 0, &phonehash) != 0) {
     73        if (ipc_connect_to_me(dev_phone, 0, 0, 0, NULL, &phonehash) != 0) {
    7474                printf(NAME ": Failed to create callback from device\n");
    7575                return false;
  • uspace/srv/hid/console/console.c

    rfdb9982c r124c061  
    727727        /* NB: The callback connection is slotted for removal */
    728728        sysarg_t phonehash;
    729         if (ipc_connect_to_me(kbd_phone, SERVICE_CONSOLE, 0, 0, &phonehash) != 0) {
     729        if (ipc_connect_to_me(kbd_phone, SERVICE_CONSOLE, 0, 0, NULL,
     730            &phonehash) != 0) {
    730731                printf(NAME ": Failed to create callback from input device\n");
    731732                return false;
     
    749750        }
    750751       
    751         if (ipc_connect_to_me(mouse_phone, SERVICE_CONSOLE, 0, 0, &phonehash) != 0) {
     752        if (ipc_connect_to_me(mouse_phone, SERVICE_CONSOLE, 0, 0, NULL,
     753            &phonehash) != 0) {
    752754                printf(NAME ": Failed to create callback from mouse device\n");
    753755                mouse_phone = -1;
  • uspace/srv/hid/fb/main.c

    rfdb9982c r124c061  
    114114                return -1;
    115115       
    116         sysarg_t phonead;
    117         if (ipc_connect_to_me(PHONE_NS, SERVICE_VIDEO, 0, 0, &phonead) != 0)
     116        if (ipc_connect_to_me(PHONE_NS, SERVICE_VIDEO, 0, 0, NULL, NULL) != 0)
    118117                return -1;
    119118       
  • uspace/srv/hid/kbd/port/adb.c

    rfdb9982c r124c061  
    7272        /* NB: The callback connection is slotted for removal */
    7373        sysarg_t phonehash;
    74         if (ipc_connect_to_me(dev_phone, 0, 0, 0, &phonehash) != 0) {
     74        if (ipc_connect_to_me(dev_phone, 0, 0, 0, NULL, &phonehash) != 0) {
    7575                printf(NAME ": Failed to create callback from device\n");
    7676                return false;
  • uspace/srv/hid/kbd/port/chardev.c

    rfdb9982c r124c061  
    9292        /* NB: The callback connection is slotted for removal */
    9393        sysarg_t phonehash;
    94         if (ipc_connect_to_me(dev_phone, 0, 0, 0, &phonehash) != 0) {
     94        if (ipc_connect_to_me(dev_phone, 0, 0, 0, NULL, &phonehash) != 0) {
    9595                printf(NAME ": Failed to create callback from device\n");
    9696                return -1;
  • uspace/srv/hw/irc/apic/apic.c

    rfdb9982c r124c061  
    108108       
    109109        async_set_client_connection(apic_connection);
    110         sysarg_t phonead;
    111         ipc_connect_to_me(PHONE_NS, SERVICE_APIC, 0, 0, &phonead);
     110        ipc_connect_to_me(PHONE_NS, SERVICE_APIC, 0, 0, NULL, NULL);
    112111       
    113112        return true;
  • uspace/srv/hw/irc/fhc/fhc.c

    rfdb9982c r124c061  
    137137       
    138138        async_set_client_connection(fhc_connection);
    139         sysarg_t phonead;
    140         ipc_connect_to_me(PHONE_NS, SERVICE_FHC, 0, 0, &phonead);
     139        ipc_connect_to_me(PHONE_NS, SERVICE_FHC, 0, 0, NULL, NULL);
    141140       
    142141        return true;
  • uspace/srv/hw/irc/i8259/i8259.c

    rfdb9982c r124c061  
    150150       
    151151        async_set_client_connection(i8259_connection);
    152         sysarg_t phonead;
    153         ipc_connect_to_me(PHONE_NS, SERVICE_I8259, 0, 0, &phonead);
     152        ipc_connect_to_me(PHONE_NS, SERVICE_I8259, 0, 0, NULL, NULL);
    154153       
    155154        return true;
  • uspace/srv/hw/irc/obio/obio.c

    rfdb9982c r124c061  
    138138       
    139139        async_set_client_connection(obio_connection);
    140         sysarg_t phonead;
    141         ipc_connect_to_me(PHONE_NS, SERVICE_OBIO, 0, 0, &phonead);
     140        ipc_connect_to_me(PHONE_NS, SERVICE_OBIO, 0, 0, NULL, NULL);
    142141       
    143142        return true;
  • uspace/srv/hw/netif/ne2000/ne2000.c

    rfdb9982c r124c061  
    397397        async_set_interrupt_received(irq_handler);
    398398       
    399         sysarg_t phonehash;
    400         return ipc_connect_to_me(PHONE_NS, SERVICE_NE2000, 0, 0, &phonehash);
     399        return ipc_connect_to_me(PHONE_NS, SERVICE_NE2000, 0, 0, NULL, NULL);
    401400}
    402401
  • uspace/srv/loader/main.c

    rfdb9982c r124c061  
    423423int main(int argc, char *argv[])
    424424{
    425         sysarg_t phonead;
    426425        task_id_t id;
    427426        int rc;
     
    439438       
    440439        /* Register at naming service. */
    441         if (ipc_connect_to_me(PHONE_NS, SERVICE_LOAD, 0, 0, &phonead) != 0)
     440        if (ipc_connect_to_me(PHONE_NS, SERVICE_LOAD, 0, 0, NULL, NULL) != 0)
    442441                return -2;
    443442
  • uspace/srv/net/net/net.c

    rfdb9982c r124c061  
    326326static int net_module_start(async_client_conn_t client_connection)
    327327{
    328         sysarg_t phonehash;
    329328        int rc;
    330329       
     
    338337                goto out;
    339338       
    340         rc = ipc_connect_to_me(PHONE_NS, SERVICE_NETWORKING, 0, 0, &phonehash);
     339        rc = ipc_connect_to_me(PHONE_NS, SERVICE_NETWORKING, 0, 0, NULL, NULL);
    341340        if (rc != EOK)
    342341                goto out;
  • uspace/srv/net/netif/lo/lo.c

    rfdb9982c r124c061  
    167167int netif_initialize(void)
    168168{
    169         sysarg_t phonehash;
    170         return ipc_connect_to_me(PHONE_NS, SERVICE_LO, 0, 0, &phonehash);
     169        return ipc_connect_to_me(PHONE_NS, SERVICE_LO, 0, 0, NULL, NULL);
    171170}
    172171
  • uspace/srv/vfs/vfs.c

    rfdb9982c r124c061  
    173173         * Register at the naming service.
    174174         */
    175         sysarg_t phonead;
    176         ipc_connect_to_me(PHONE_NS, SERVICE_VFS, 0, 0, &phonead);
     175        ipc_connect_to_me(PHONE_NS, SERVICE_VFS, 0, 0, NULL, NULL);
    177176       
    178177        /*
Note: See TracChangeset for help on using the changeset viewer.