Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions engine/include/libvmcu/libvmcu_system.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,13 @@ extern void vmcu_system_dtor(vmcu_system_t *this);
* */
extern int vmcu_system_step(vmcu_system_t *this);

/*
* vmcu_system_step_n - multiple steps
* @this: pointer to virtual system
* @nsteps: number of steps
* */
extern int vmcu_system_step_n(vmcu_system_t *this, uint64_t nsteps);

/*
* vmcu_system_backstep - single step back
* @this: pointer to virtual system
Expand Down
1 change: 1 addition & 0 deletions engine/include/system/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ extern void vmcu_system_dtor(vmcu_system_t *this);
/* General System Functions */

extern int vmcu_system_step(vmcu_system_t *this);
extern int vmcu_system_step_n(vmcu_system_t *this, uint64_t nsteps);
extern void vmcu_system_backstep(vmcu_system_t *this);
extern void vmcu_system_reboot(vmcu_system_t *this);

Expand Down
13 changes: 13 additions & 0 deletions engine/src/system/system.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,19 @@ void vmcu_system_dtor(vmcu_system_t *this) {
free(this);
}

int vmcu_system_step_n(vmcu_system_t *this, uint64_t nsteps) {

int err = 0;

for(uint64_t i = 0; i < nsteps; i++){
err = vmcu_system_step(this);
if (err){
return err;
}
}
return err;
}

int vmcu_system_step(vmcu_system_t *this) {

int err = 0;
Expand Down