Orion S. Lawlor (ffosl@uaf.edu)
CS 321, 2005/2/16
PROJECT1 Design Paper

I've chosen to implement an event handling library called oslevent.  Because this library transfers control between user-created objects, not threads or processes, I don't need to make any unusual operating system support calls.

The central data structure inside oslevent_pool is the event queue--the list of events that are ready to execute. I plan to implement this queue using one of the STL containers--I think I can use the STL class "queue".  The queue will hold pointers to all the events that are ready to execute.

My interface routine oslevent->add then simply inserts the new event into the back of the event queue.  The interface routine oslevent->loop will be a loop that repeatedly extracts the next event from the front of the event queue, and executes it.  When the event queue runs of events, oslevent->loop will return.

I kept my interface really simple, so I don't think I'll have to change anything in the "topic" paper.