The Pedigree Project  0.1
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
IoEvent Class Reference

#include <IoEvent.h>

+ Inheritance diagram for IoEvent:
+ Collaboration diagram for IoEvent:

Public Member Functions

 IoEvent ()
 
 IoEvent (PosixSubsystem *subsystem, File *file)
 
void fire ()
 
PosixSubsystemgetSubsystem ()
 
virtual size_t serialize (uint8_t *pBuffer)
 
virtual size_t getNumber ()
 
- Public Member Functions inherited from Event
 Event (uintptr_t handlerAddress, bool isDeletable, size_t specificNestingLevel=~0UL)
 
virtual bool isDeletable ()
 
uintptr_t getHandlerAddress ()
 
size_t getSpecificNestingLevel ()
 
 Event (const Event &other)
 
Eventoperator= (const Event &other)
 
void registerThread (Thread *thread)
 
void deregisterThread (Thread *thread)
 
size_t pendingCount ()
 
virtual void waitForDeliveries ()
 

Static Public Member Functions

static bool unserialize (uint8_t *pBuffer, IoEvent &event)
 
- Static Public Member Functions inherited from Event
static uintptr_t getTrampoline ()
 
static uintptr_t getSecondaryTrampoline ()
 
static uintptr_t getHandlerBuffer ()
 
static uintptr_t getLastHandlerBuffer ()
 
static bool unserialize (uint8_t *pBuffer, Event &event)
 
static size_t getEventType (uint8_t *pBuffer)
 

Private Attributes

PosixSubsystemm_pSubsystem
 
Filem_pFile
 
IoEventm_pRetriggerInstance
 

Additional Inherited Members

- Protected Attributes inherited from Event
uintptr_t m_HandlerAddress
 
bool m_bIsDeletable
 
size_t m_NestingLevel
 
size_t m_Magic
 
List< Thread * > m_Threads
 
Spinlock m_Lock
 

Detailed Description

Event class for passing to File::monitor.

Definition at line 27 of file IoEvent.h.

Constructor & Destructor Documentation

IoEvent::IoEvent ( )

Pass in a subsystem which is used to forward on the event. This allows the correct event handler in userspace to change without having to re-create the IoEvent.

Definition at line 28 of file IoEvent.cc.

References assert, Event::Event(), Processor::information(), File::monitor(), and PosixSubsystem::sendSignal().

Member Function Documentation

virtual size_t IoEvent::getNumber ( )
inlinevirtual

Returns the event number / ID.

Implements Event.

Definition at line 50 of file IoEvent.h.

size_t IoEvent::serialize ( uint8_t *  pBuffer)
virtual

Given a buffer EVENT_LIMIT bytes long, take the variables present in this object and convert them to a binary form.

It can be assumed that this function will only be called when the Event is about to be dispatched, and so the inhibited mask of the current Thread is available to be changed to what the event handler requires. This change will be undone when the handler completes.

Parameters
pBufferThe buffer to serialize to.
Returns
The number of bytes serialized.

Implements Event.

Definition at line 54 of file IoEvent.cc.

References FATAL.


The documentation for this class was generated from the following files: