Beginnings of an implementation of channels for ROS
authorKevin Klues <klueska@eecs.berkeley.edu>
Thu, 30 Jul 2009 18:10:39 +0000 (11:10 -0700)
committerKevin Klues <klueska@eecs.berkeley.edu>
Sat, 1 Aug 2009 00:56:50 +0000 (17:56 -0700)
commit4f67635529064b691c1ac92bde27e2494dfe700d
tree208a1035392008dc4e045c9ea43595d374b934f3
parent448045536e0a9000e2d4c6594611f02495fa9682
Beginnings of an implementation of channels for ROS

The channel implementation uses shared memory for the communication channel. The create / delete API consists of user level library code that makes system calls to set up shared memory pages between 2 processes (environments).  For each direction of the channel 2 pages are needed.  One for holding the ring buffer, and one for storing the data.  The ring buffer page is mapped in as read/write by both processes, while the data page is read/write for the creator of the channel, but read only by the listener on the channel.  For bidirectional channels, two of these single directional channels are necessary.

To support channels in this way, a range of addresses in the virtual address space has now been reserved for sysevents, much like the space reserved for asynchronous system calls that we had before.  The space reserved for sysevents contains a ring buffer that the user space program can poll on to see if the kernel has tried sending it any events.  Eventntually we will want to allow the user space process to register events of interest with the kernel so that it will be interrupted if they come in, rather than needing to explicitly poll for them.

Additionally, the directory structure and proper symlinks, etc. for getting everything to compile for parlib with the new directory structure is now in place.
39 files changed:
.gitignore
GNUmakefile
kern/include/listable.h [new file with mode: 0644]
kern/include/pmap.h
kern/include/ros/env.h
kern/include/ros/memlayout.h
kern/include/ros/ring_buffer.h
kern/include/ros/syscall.h
kern/include/ros/sysevent.h [new file with mode: 0644]
kern/src/Makefrag
kern/src/env.c
kern/src/manager.c
kern/src/pmap.c
kern/src/syscall.c
kern/src/sysevent.c [new file with mode: 0644]
user/Makefrag
user/apps/parlib/Makefrag
user/apps/parlib/channel_test_client.c [new file with mode: 0644]
user/apps/parlib/channel_test_server.c [new file with mode: 0644]
user/parlib/Makefrag
user/parlib/inc/arch
user/parlib/inc/channel.h [new file with mode: 0644]
user/parlib/inc/parlib.h
user/parlib/inc/ros
user/parlib/ivy/Makefrag [new file with mode: 0644]
user/parlib/ivy/deputy.c [new file with mode: 0644]
user/parlib/src/Makefrag
user/parlib/src/channel.c [new file with mode: 0644]
user/parlib/src/entry.S [deleted file]
user/parlib/src/entry_i386.S [new file with mode: 0644]
user/parlib/src/entry_sparc.S [new file with mode: 0644]
user/parlib/src/newlib_backend.c
user/parlib/src/syscall.c
user/parlib/src/syscall_i386.c [new file with mode: 0644]
user/parlib/src/syscall_sparc.c [new file with mode: 0644]
user/roslib/Makefrag
user/roslib/src/entry_i386.S
user/roslib/src/entry_sparc.S
user/roslib/src/syscall.c