GPUart  1.01
Prototype of GPUart, an application-based limited preemptive GPU scheduler for embedded real-time systems
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
Macros | Functions | Variables
SWC_Scheduler.cpp File Reference
#include "../Sobel1/SWC_Sobel1.h"
#include "../Sobel2/SWC_Sobel2.h"
#include "../MatrMul/SWC_MM.h"
#include "SWC_Scheduler.h"
#include "../../GPUart/GPUart.h"
#include <pthread.h>
#include <signal.h>
#include <time.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
Include dependency graph for SWC_Scheduler.cpp:

Macros

#define C_SWC_SCH_NUMBER_OF_THREADS   (4)
 
#define C_SWC_SCH_SYSTEM_OPERATION_TIME   (100000)
 
#define C_SWC_SCH_TIMER_RESOLUTION   (100 * 1000/*ns -> 0.1 ms resolution*/)
 
#define C_SWC_SCH_NR_DIFFERENT_PERIODS   (10)
 
#define C_SWC_SCH_PERIOD_1MS   (0)
 
#define C_SWC_SCH_PERIOD_2MS   (1)
 
#define C_SWC_SCH_PERIOD_5MS   (2)
 
#define C_SWC_SCH_PERIOD_10MS   (3)
 
#define C_SWC_SCH_PERIOD_20MS   (4)
 
#define C_SWC_SCH_PERIOD_50MS   (5)
 
#define C_SWC_SCH_PERIOD_100MS   (6)
 
#define C_SWC_SCH_PERIOD_200MS   (7)
 
#define C_SWC_SCH_PERIOD_500MS   (8)
 
#define C_SWC_SCH_PERIOD_1000MS   (9)
 

Functions

static void * swc_Scheduler_MPMD (void *args)
 
static void swc_Scheduler_Timer (void)
 
static void swc_Scheduler_Thread0 (void)
 
static void swc_Scheduler_Thread1 (void)
 
static void swc_Scheduler_Thread2 (void)
 
unsigned int swc_Scheduler_getClock (void)
 
void swc_init (void)
 
void swc_Scheduler_init (void)
 
void swc_Scheduler_run (void)
 

Variables

static const unsigned int swc_sch_task_periods [C_SWC_SCH_NR_DIFFERENT_PERIODS]
 
static const unsigned int swc_sch_task_activ_offsets [C_SWC_SCH_NUMBER_OF_THREADS-1][C_SWC_SCH_NR_DIFFERENT_PERIODS]
 
static unsigned char swc_sch_task_used [C_SWC_SCH_NUMBER_OF_THREADS-1][C_SWC_SCH_NR_DIFFERENT_PERIODS]
 
static volatile unsigned char swc_sch_task_event [C_SWC_SCH_NUMBER_OF_THREADS-1][C_SWC_SCH_NR_DIFFERENT_PERIODS]
 
static volatile unsigned char swc_sch_terminate_threads = 0u
 
static unsigned int swc_Scheduler_clock = 0u
 

Macro Definition Documentation

#define C_SWC_SCH_NR_DIFFERENT_PERIODS   (10)
#define C_SWC_SCH_NUMBER_OF_THREADS   (4)
#define C_SWC_SCH_PERIOD_1000MS   (9)
#define C_SWC_SCH_PERIOD_100MS   (6)
#define C_SWC_SCH_PERIOD_10MS   (3)
#define C_SWC_SCH_PERIOD_1MS   (0)
#define C_SWC_SCH_PERIOD_200MS   (7)
#define C_SWC_SCH_PERIOD_20MS   (4)
#define C_SWC_SCH_PERIOD_2MS   (1)
#define C_SWC_SCH_PERIOD_500MS   (8)
#define C_SWC_SCH_PERIOD_50MS   (5)
#define C_SWC_SCH_PERIOD_5MS   (2)
#define C_SWC_SCH_SYSTEM_OPERATION_TIME   (100000)
#define C_SWC_SCH_TIMER_RESOLUTION   (100 * 1000/*ns -> 0.1 ms resolution*/)

Function Documentation

void swc_init ( void  )

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned int swc_Scheduler_getClock ( void  )

Here is the caller graph for this function:

void swc_Scheduler_init ( void  )

Here is the caller graph for this function:

static void * swc_Scheduler_MPMD ( void *  args)
static

Here is the call graph for this function:

Here is the caller graph for this function:

void swc_Scheduler_run ( void  )

Here is the call graph for this function:

Here is the caller graph for this function:

static void swc_Scheduler_Thread0 ( void  )
static

Here is the call graph for this function:

Here is the caller graph for this function:

static void swc_Scheduler_Thread1 ( void  )
static

Here is the call graph for this function:

Here is the caller graph for this function:

static void swc_Scheduler_Thread2 ( void  )
static

Here is the call graph for this function:

Here is the caller graph for this function:

static void swc_Scheduler_Timer ( void  )
static

Here is the caller graph for this function:

Variable Documentation

const unsigned int swc_sch_task_activ_offsets[C_SWC_SCH_NUMBER_OF_THREADS-1][C_SWC_SCH_NR_DIFFERENT_PERIODS]
static
Initial value:
=
{
{ 0, 0, 0, 20, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 750 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
}
volatile unsigned char swc_sch_task_event[C_SWC_SCH_NUMBER_OF_THREADS-1][C_SWC_SCH_NR_DIFFERENT_PERIODS]
static
const unsigned int swc_sch_task_periods[C_SWC_SCH_NR_DIFFERENT_PERIODS]
static
Initial value:
=
{
10u,
20u,
50u,
100u,
200u,
500u,
1000u,
2000u,
5000u,
10000u
}
unsigned char swc_sch_task_used[C_SWC_SCH_NUMBER_OF_THREADS-1][C_SWC_SCH_NR_DIFFERENT_PERIODS]
static
Initial value:
=
{
{ 0, 0, 0, 1, 0, 0, 1, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 1, 0, 1 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
}
volatile unsigned char swc_sch_terminate_threads = 0u
static
unsigned int swc_Scheduler_clock = 0u
static