File cmb_process.h

Parent directory (include)

The simulated processes, the active entities in the simulation, interacting with each other and with passive resources.

Definition (include/cmb_process.h)

Detailed Description

The cmb_process is a named coroutine that works in the simulated time and interacts with events off the simulation event queue. It has a name and a priority, which can be changed later.

The cmb_process can hold (deactivate itself for a certain interval of simulated time) and wait for resources to become available. In those states, it can also be interrupted by other processes. The interrupt passes a nonzero value that appears as the return value from hold, to be used for distinguishing between normal return vs. various (possibly user-defined) interrupt types.

In the same way as the interrupt call, the functions for starting and stopping a process are non-blocking. The calling process will continue immediately, until it explicitly transfers control to another process by yield or resume. The actual transfer of control happens from a scheduled event, defined in cmb_process.c.

Includes

Included By

Classes