Class Customer
Placement in the overall structure
- Module
- thread
- Base classes
- Entrant
- Derived classes
- Thread
-
- Time of creation
- Task 6
- Files
customer.h
Description
The Customer class extends the Entrant class
with the ability to record and retrieve an event that the process in
question is waiting for.
Public methods
Customer (void* tos)
- The constructor passes the tos parameter to the
constructor of the base class Entrant.
void waiting_in (Waitingroom *w)
- This method is used to note in the Customer that it is currently waiting for an event in the Waitingroom w.
Waitingroom* waiting_in ()
- This can be used to determine in which Waitingroom
object the customer is registered. A return value of 0 should mean
that the process is not waiting for any event, i.e. it is either
the currently running process, is on the scheduler's ready list,
has already been terminated or has not yet been registered with
the scheduler.