![]() |
GPUart
1.01
Prototype of GPUart, an application-based limited preemptive GPU scheduler for embedded real-time systems
|
Interface to the GPUart Scheduling layer. More...


Go to the source code of this file.
Enumerations | |
| enum | gpuS_kernelTask_status_e { E_STATUS_READY = 0, E_STATUS_RUNNING = 1, E_STATUS_TERMINATED = 2, E_STATUS_INIT = 3 } |
| The possible scheduling states of a kernel. More... | |
Functions | |
| GPUart_Retval | gpuS_schedule (void) |
| Executes the scheduling decision. More... | |
| GPUart_Retval | gpuS_new_Job (kernel_task_id_e task_id_e) |
| Releases a new job and pushes it to the shared job stack gpuS_JobStackShared_s. More... | |
| GPUart_Retval | gpuS_query_terminated (kernel_task_id_e task_id_e) |
| Queries whether a job has terminated. More... | |
| GPUart_Retval | gpuS_query_ready_to_call (kernel_task_id_e task_id_e) |
| Queries whether a kernel is ready to get instantiated. More... | |
| GPUart_Retval | gpuS_init (void) |
| Initializes the GPUart Scheduling layer. More... | |
| GPUart_Retval | gpuS_destroy (void) |
| Destroys the GPUart Scheduling layer. More... | |
Interface to the GPUart Scheduling layer.
The possible scheduling states of a kernel.
Every job starts with status E_STATUS_INIT. The possible transitions are E_STATUS_INIT -> E_STATUS_READY or E_STATUS_TERMINATED -> E_STATUS_READY when a kernel gets instantiated; E_STATUS_RUNNING -> E_STATUS_READY when a job has been preempted; E_STATUS_READY -> E_STATUS_RUNNING when the scheduler schedules a job; and E_STATUS_RUNNING -> E_STATUS_TERMINATED when a job completes.
| GPUart_Retval gpuS_destroy | ( | void | ) |
Destroys the GPUart Scheduling layer.
Destroys the mutex of each job_stack_s.

| GPUart_Retval gpuS_init | ( | void | ) |
Initializes the GPUart Scheduling layer.
Initializes all variables of the Scheduling layer.


| GPUart_Retval gpuS_new_Job | ( | kernel_task_id_e | task_id_e | ) |
Releases a new job and pushes it to the shared job stack gpuS_JobStackShared_s.
| kernel_task_id_e | task_id_e -> The ID of the kernel which this function instatiates. |


| GPUart_Retval gpuS_query_ready_to_call | ( | kernel_task_id_e | task_id_e | ) |
Queries whether a kernel is ready to get instantiated.
| kernel_task_id_e | task_id_e -> The ID of the kernel. |

| GPUart_Retval gpuS_query_terminated | ( | kernel_task_id_e | task_id_e | ) |
Queries whether a job has terminated.
| kernel_task_id_e | task_id_e -> The ID of the kernel. |

| GPUart_Retval gpuS_schedule | ( | void | ) |
Executes the scheduling decision.
If the compiler switch S_NON_PREEMPTIVE is defined, this function schedules kernel non-preemptively, otherwise it schedules them in a limited preemptive manner. First this function updates the kernel's scheduling state and deletes completed kernels form gpuS_JobList_s, then it updates the job list gpuS_JobList_s with all new released kernels. After that, this function iterates through gpuS_JobList_s and executes the scheduling decision according to the scheduling policy defined in S_SCHED_POLICY.


1.8.6