.. _file_include_cmb_process.h: File cmb_process.h ================== |exhale_lsh| :ref:`Parent directory ` (``include``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS The simulated processes, the active entities in the simulation, interacting with each other and with passive resources. .. contents:: Contents :local: :backlinks: none Definition (``include/cmb_process.h``) -------------------------------------- .. toctree:: :maxdepth: 1 program_listing_file_include_cmb_process.h.rst 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 -------- - ``cmb_assert.h`` (:ref:`file_include_cmb_assert.h`) - ``cmb_event.h`` (:ref:`file_include_cmb_event.h`) - ``cmi_coroutine.h`` - ``cmi_slist.h`` Included By ----------- - :ref:`file_include_cimba.h` - :ref:`file_include_cmb_resource.h` - :ref:`file_include_cmb_resourceguard.h` Classes ------- - :ref:`exhale_struct_structcmb__process`