Split ev_mbox into a union of mbox types (XCC)
authorBarret Rhoden <brho@cs.berkeley.edu>
Wed, 12 Aug 2015 19:55:45 +0000 (15:55 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Mon, 28 Sep 2015 19:14:00 +0000 (15:14 -0400)
commit0842a2932fa2e50cb056980707802387d3796673
tree4a1ca727f439b2a8c5945c49144c95f4ee8e4fee
parentb84406cfc772c9142b3956e07f9b0cce056b1f8c
Split ev_mbox into a union of mbox types (XCC)

Previously, an event mailbox consisted of a UCQ for messages with
payloads and a bitmap for the "NOMSG" events.  In general, we want to
support different types of mailboxes, with the functionality switched on
by type.

The rule is that all mboxes must know how to handle an event_msg, in an
mbox-specific manner.  For bitmaps, it's to just send the type.  If the
user screws up and loses the payload, that's on them.

There is one usage of NOMSG at the moment - the simple_evq.  What's
happening now is that the mbox is being treated as a UCQ, and in
early-scp context may eventually overflow if there are enough syscalls
before initializing the uthread library.

Also note that you can still do the 'raw' initialization of mailboxes.
For instance, with UCQs, you may want to do one big mmap for the UCQ
pages, instead of two mmaps per initialization.  You can still do this,
if you know you're dealing with a UCQ.

Rebuild the world.
kern/include/ros/evbitmap.h [new file with mode: 0644]
kern/include/ros/event.h
kern/src/event.c
user/parlib/evbitmap.c [new file with mode: 0644]
user/parlib/event.c
user/parlib/include/evbitmap.h [new file with mode: 0644]
user/parlib/include/event.h
user/parlib/vcore.c
user/pthread/pthread.c