Definition in file rk_stub.h.
Include dependency graph for rk_stub.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Classes | |||||||
struct | rk_resource_set | ||||||
struct | cpu_reserve | ||||||
struct | rk_stub_pcb | ||||||
struct | rk_stub_data | ||||||
Defines | |||||||
#define | MAX_PCB 128 | ||||||
The maximum number of simulated process control blocks. | |||||||
#define | clock_gettime(clock_id, ts) rk_clock_gettime(clock_id, ts) | ||||||
| |||||||
#define | clock_settime(clock_id, ts) rk_clock_settime(clock_id, ts) | ||||||
This function should really only be used to set the time to a value _before_ the next event.
| |||||||
#define | clock_getres(clock_id, ts) rk_clock_getres(clock_id, ts) | ||||||
| |||||||
Typedefs | |||||||
typedef cpu_reserve * | cpu_reserve_t | ||||||
Forward declaration of the CPU reservation structure. | |||||||
typedef rk_stub_precall_retval_t(* | rk_stub_precall_t )(void *data) | ||||||
Prototype for the pre-data-period process call back. | |||||||
typedef void(* | rk_stub_postcall_t )(void *data) | ||||||
Prototype for the post-data-period process call back. | |||||||
typedef enum rk_stub_mode_t | rk_stub_mode_t | ||||||
The rk_stub_mode_t type enumerates the set of modes the rk_stub code can support. | |||||||
Enumerations | |||||||
enum | rk_cpu_reserve_trace_t { RK_CPU_TRACE_PERIOD, RK_CPU_TRACE_DEADLINE, RK_CPU_TRACE_COMPLETE, RK_CPU_TRACE_DROP, RK_CPU_TRACE_REALTIME, RK_CPU_TRACE_COMPUTE_SUCCESS, RK_CPU_TRACE_COMPUTE_FAIL, RK_CPU_TRACE_MAX } | ||||||
The rk_cpu_reserve_trace_t type enumerates the set of trace files generated by the stubs. More... | |||||||
enum | { CRB_RUNNING } | ||||||
enum | { CRF_RUNNING = (1L << CRB_RUNNING) } | ||||||
enum | { PCBB_IN_USE } | ||||||
enum | { PCBF_IN_USE = (1L << PCBB_IN_USE) } | ||||||
enum | rk_stub_precall_retval_t { RKSP_OK, RKSP_DROP } | ||||||
The rk_stub_precall_retval_t type enumerates the possible return values for an rk_stub_precall_t call back. More... | |||||||
enum | rk_stub_mode_t { RK_STUB_MIN, RK_STUB_LOG, RK_STUB_SIM, RK_STUB_MAX } | ||||||
The rk_stub_mode_t type enumerates the set of modes the rk_stub code can support. More... | |||||||
enum | { SDB_IN_TICK } | ||||||
enum | { SDF_IN_TICK = (1L << SDB_IN_TICK) } | ||||||
Functions | |||||||
void | rk_stub_set_mode (rk_stub_mode_t mode) | ||||||
Initialize the stub code and set the desired mode. | |||||||
void | rk_stub_next_tick (void) | ||||||
Advance the simulated time. | |||||||
pid_t | rk_stub_mk_pid (const char *name, void *data, rk_stub_precall_t precall, rk_stub_postcall_t postcall) | ||||||
Make a simulated process that will "consume" resources during its period. | |||||||
void | rk_stub_getrusage (pid_t pid, struct rusage *ru) | ||||||
Get the CPU usage for the simulated process. |
|
Prototype for the post-data-period process call back. These functions are called after a data period has been simulated.
|
|
Prototype for the pre-data-period process call back. These functions are called before a new data period is simulated.
Definition at line 178 of file rk_stub.h. Referenced by rk_cpu_reserve_tick(). |
|
|
The rk_stub_mode_t type enumerates the set of modes the rk_stub code can support.
|
|
The rk_stub_precall_retval_t type enumerates the possible return values for an rk_stub_precall_t call back.
Definition at line 166 of file rk_stub.h. Referenced by c1_pre(), cxx_delegate_precall(), ContractDelegate::precall(), and BasicDelegate::precall(). |
|
Get the CPU usage for the simulated process.
Definition at line 1941 of file rk_stub.c. References MAX_PCB, require, and rk_stub_data. Referenced by BasicDelegate::postcall(), and BasicDelegate::precall(). |
|
Make a simulated process that will "consume" resources during its period.
Definition at line 1908 of file rk_stub.c. References require, and rk_stub_data. Referenced by BasicDelegate::BasicDelegate(). |
|
Advance the simulated time. Simulated time starts at zero and then continually advances to the next simulated event, such as a period end. Definition at line 1877 of file rk_stub.c. References ensure, require, rk_cpu_reserve_tick(), rk_resource_set_t, rk_stub_data, and timespec_to_microsec(). |
Here is the call graph for this function:
|
Initialize the stub code and set the desired mode.
Definition at line 1320 of file rk_stub.c. References lnNewList(), require, and rk_stub_data. |
Here is the call graph for this function: