Use user-defined labels instead of phone hashes
commit676900501376128cbb87ed9ea866e1bfbb52a5db
authorJakub Jermar <jakub@jermar.eu>
Sun, 28 Oct 2018 12:42:35 +0000 (28 13:42 +0100)
committerJakub Jermar <jakub@jermar.eu>
Wed, 31 Oct 2018 06:03:38 +0000 (31 07:03 +0100)
treea4940d12f1f59a685c887f6468b1bb7a53470291
parent94ab1feee60e1dc265439cd0a4cd8a99e8543b48
Use user-defined labels instead of phone hashes

This commit changes the way how the async framework maps incomming calls
to connections. Instead of abusing the kernel addresses of attached
phones as identifiers, the IPC_M_CONNECT_TO_ME and IPC_M_CONNECT_ME_TO
messages allow the server to specify an arbitrary label which is
remembered in the connected phone and consequently imprinted on each
call which is routed through this phone.

The async framework uses the address of the connection structure as the
label. This removes the need for a connection hash table because each
incoming call already remembers the connection in its label.

To disambiguate this new label and the other user-defined label used for
answers, the call structure now has the request_label member for the
former and answer_label member for the latter.

This commit also moves the kernel definition of ipc_data_t to abi/ and
removes the uspace redefinition thereof. Finally, when forwarding the
IPC_M_CONNECT_TO_ME call, the phone capability and the kernel object
allocated in request_process are now correctly disposed of.
58 files changed:
abi/include/abi/ipc/ipc.h
abi/include/abi/ipc/methods.h
kernel/generic/include/ipc/ipc.h
kernel/generic/src/ipc/ipc.c
kernel/generic/src/ipc/ops/conctmeto.c
kernel/generic/src/ipc/ops/concttome.c
kernel/generic/src/ipc/sysipc.c
uspace/app/wavplay/dplay.c
uspace/app/wavplay/drec.c
uspace/drv/bus/adb/cuda_adb/cuda_adb.c
uspace/drv/hid/adb-kbd/adb-kbd.c
uspace/drv/hid/adb-mouse/adb-mouse.c
uspace/drv/intctl/apic/apic.c
uspace/drv/intctl/i8259/i8259.c
uspace/drv/intctl/icp-ic/icp-ic.c
uspace/drv/intctl/obio/obio.c
uspace/lib/c/generic/async/client.c
uspace/lib/c/generic/async/server.c
uspace/lib/c/generic/bd_srv.c
uspace/lib/c/generic/inet/tcp.c
uspace/lib/c/generic/inet/udp.c
uspace/lib/c/generic/io/chardev_srv.c
uspace/lib/c/generic/io/con_srv.c
uspace/lib/c/generic/iplink_srv.c
uspace/lib/c/include/async.h
uspace/lib/c/include/ipc/common.h
uspace/lib/drv/generic/driver.c
uspace/lib/fs/libfs.c
uspace/lib/graph/graph.c
uspace/lib/hound/src/protocol.c
uspace/lib/usbvirt/src/device.c
uspace/srv/audio/hound/audio_device.c
uspace/srv/bd/vbd/vbd.c
uspace/srv/clipboard/clipboard.c
uspace/srv/devman/client_conn.c
uspace/srv/devman/drv_conn.c
uspace/srv/hid/compositor/compositor.c
uspace/srv/hid/input/input.c
uspace/srv/hid/isdv4_tablet/main.c
uspace/srv/hid/output/output.c
uspace/srv/hid/s3c24xx_ts/s3c24xx_ts.c
uspace/srv/loader/main.c
uspace/srv/locsrv/locsrv.c
uspace/srv/logger/ctl.c
uspace/srv/logger/writer.c
uspace/srv/net/dhcp/main.c
uspace/srv/net/dnsrsrv/dnsrsrv.c
uspace/srv/net/inetsrv/inetcfg.c
uspace/srv/net/inetsrv/inetping.c
uspace/srv/net/inetsrv/inetsrv.c
uspace/srv/net/tcp/service.c
uspace/srv/net/udp/service.c
uspace/srv/ns/ns.c
uspace/srv/ns/task.c
uspace/srv/taskmon/taskmon.c
uspace/srv/vfs/vfs.c
uspace/srv/vfs/vfs_ipc.c
uspace/srv/volsrv/volsrv.c