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 | cpu_reserve |
struct | rk_resource_set |
struct | rk_stub_data |
struct | rk_stub_pcb |
Defines | |
#define | MAX_PCB 128 |
The maximum number of simulated process control blocks. | |
Typedefs | |
typedef cpu_reserve * | cpu_reserve_t |
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 |
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 } |
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 } |
enum | rk_stub_mode_t { RK_STUB_MIN, RK_STUB_LOG, RK_STUB_SIM, RK_STUB_MAX } |
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.
|
|
Get the CPU usage for the simulated process.
|
|
Make a simulated process that will "consume" resources during its period.
|
|
Advance the simulated time. Simulated time starts at zero and then continually advances to the next simulated event, such as a period end. |
|
Initialize the stub code and set the desired mode.
|