#include <stdint.h>
#include "temu-c/Support/Attributes.h"
Go to the source code of this file.
◆ temu_ExecutionState
◆ temu_Object
◆ temu_TimeSource
◆ temu_ExecutionState
Enumerator |
---|
teES_Stopped | |
teES_Running | |
teES_Stepping | |
◆ temu_asyncStop()
Stop the current scheduler
The function returns immediately, before the scheduler has stopped. The function is suitable for use in e.g. signal handlers.
◆ temu_getExecutionState()
Get the current execution status of TEMU
- Returns
- Current execution status
◆ temu_getScheduledProcessor()
Get processor in global scheduler
- Parameters
-
cpu | Processor number to get |
- Returns
- Processor pointer as a time source.
◆ temu_getScheduledProcessorCount()
TEMU_API unsigned temu_getScheduledProcessorCount |
( |
| ) |
|
Get the number of processors in the global scheduler.
- Returns
- Number of processors in global scheduler.
◆ temu_run()
Run the current scheduler forever
◆ temu_runForSteps()
TEMU_API void temu_runForSteps |
( |
int64_t |
steps | ) |
|
Run the current scheduler for a fixed number of steps
- Parameters
-
steps | Time in steps (in scheduler units). |
◆ temu_runForTime()
TEMU_API void temu_runForTime |
( |
double |
secs | ) |
|
Run the current scheduler for a fixed time
- Parameters
-
secs | Time in simulated seconds |
◆ temu_serializeOnNotification()
TEMU_API void temu_serializeOnNotification |
( |
temu_Object * |
notificationSource, |
|
|
const char * |
notificationName, |
|
|
double |
seconds |
|
) |
| |
Serialize execution for some time when notification is triggered
- Parameters
-
notificationSource | Object emitting notification. |
notificationName | Name of notification to intercept. |
seconds | Number of seconds (simulated time, for which to serialize execution). |
◆ temu_step()
Step a processor in the current scheduler
Note that, the other processors may run if the step exceeds the quanta. The step function currently runs processors in sequence, it is not running processors in parallel. This means that stepping is always deterministic.
- Parameters
-
cpu | The processor to step |
steps | The number of steps or instructions to execute |
◆ temu_stop()
Stop the current scheduler
The function signals the scheduler to stop, and then waits until the scheduler is in the stopped state.