[Hardware OS Interface] Shared variables and resources between the threads in the HWOS. More...
#include "hstructures.h"
Go to the source code of this file.
Defines | |
#define | HSCHED_RR_TIMESLICE 1000000 |
Timeslice (in us) for Round-Robin scheduling policy. | |
Functions | |
int | hwos_shared_initializer () |
Initialize the shared resources. | |
struct hprocess * | hwos_shared_get_next_process () |
Get next process to be placed on the FPGA. | |
int | hwos_shared_set_next_process (struct hprocess *process) |
Set next process to be placed on the FPGA. | |
int | hwos_shared_add_new_process (struct hprocess *process) |
Add a process to the new queue (done by the message server). | |
struct hprocess * | hwos_shared_get_new_process () |
Get the last process from the new queue (done by the scheduler). |
[Hardware OS Interface] Shared variables and resources between the threads in the HWOS.
This module contains shared resources between the message server, the scheduler and the placer. Each resource must be mutual exclusive.
Original author (2011): Sindre Hansen
struct hprocess* hwos_shared_get_next_process | ( | ) | [read] |
Get next process to be placed on the FPGA.
Lock the mutex to get a stable value of the process.
int hwos_shared_initializer | ( | ) |
Initialize the shared resources.
Create the queue for incoming processes and add it to the list of such queues. Note: The same HPS_NEW-queue is used for all processes, so in this case there is really no need to add it to the HPS_NEW-list.
int hwos_shared_set_next_process | ( | struct hprocess * | process | ) |
Set next process to be placed on the FPGA.
Lock the mutex to get a stable value of the process.