#include <stdlib.h>
#include "FreeRTOS.h"
#include "task.h"
#include "semphr.h"
#include "semtest.h"
Data Structures | |
struct | SEMAPHORE_PARAMETERS |
Macros | |
#define | semtstBLOCKING_EXPECTED_VALUE ( ( unsigned long ) 0xfff ) |
#define | semtstDELAY_FACTOR ( ( portTickType ) 10 ) |
#define | semtstNON_BLOCKING_EXPECTED_VALUE ( ( unsigned long ) 0xff ) |
#define | semtstNUM_TASKS ( 4 ) |
#define | semtstSTACK_SIZE configMINIMAL_STACK_SIZE |
Typedefs | |
typedef struct SEMAPHORE_PARAMETERS | xSemaphoreParameters |
Functions | |
static | portTASK_FUNCTION (prvSemaphoreTest, pvParameters) |
static | portTASK_FUNCTION_PROTO (prvSemaphoreTest, pvParameters) |
void | vStartSemaphoreTasks (unsigned portBASE_TYPE uxPriority) |
portBASE_TYPE | xAreSemaphoreTasksStillRunning (void) |
Variables | |
static volatile short | sCheckVariables [semtstNUM_TASKS] = { 0 } |
static volatile short | sNextCheckVariable = 0 |
#define semtstBLOCKING_EXPECTED_VALUE ( ( unsigned long ) 0xfff ) |
Referenced by portTASK_FUNCTION(), and vStartSemaphoreTasks().
#define semtstDELAY_FACTOR ( ( portTickType ) 10 ) |
Referenced by portTASK_FUNCTION().
#define semtstNON_BLOCKING_EXPECTED_VALUE ( ( unsigned long ) 0xff ) |
Referenced by portTASK_FUNCTION(), and vStartSemaphoreTasks().
#define semtstNUM_TASKS ( 4 ) |
Referenced by portTASK_FUNCTION(), and xAreSemaphoreTasksStillRunning().
#define semtstSTACK_SIZE configMINIMAL_STACK_SIZE |
Referenced by vStartSemaphoreTasks().
typedef struct SEMAPHORE_PARAMETERS xSemaphoreParameters |
|
static |
References pdFALSE, pdPASS, pdTRUE, portTickType, SEMAPHORE_PARAMETERS::pulSharedVariable, sCheckVariables, semtstBLOCKING_EXPECTED_VALUE, semtstDELAY_FACTOR, semtstNON_BLOCKING_EXPECTED_VALUE, semtstNUM_TASKS, sNextCheckVariable, taskYIELD, ulCounter, vTaskDelay(), SEMAPHORE_PARAMETERS::xBlockTime, SEMAPHORE_PARAMETERS::xSemaphore, xSemaphoreGive, and xSemaphoreTake.
|
static |
void vStartSemaphoreTasks | ( | unsigned portBASE_TYPE | uxPriority | ) |
References NULL, portTICK_RATE_MS, portTickType, SEMAPHORE_PARAMETERS::pulSharedVariable, pvPortMalloc(), semtstBLOCKING_EXPECTED_VALUE, semtstNON_BLOCKING_EXPECTED_VALUE, semtstSTACK_SIZE, tskIDLE_PRIORITY, vQueueAddToRegistry, vSemaphoreCreateBinary, SEMAPHORE_PARAMETERS::xBlockTime, SEMAPHORE_PARAMETERS::xSemaphore, and xTaskCreate.
portBASE_TYPE xAreSemaphoreTasksStillRunning | ( | void | ) |
References pdFALSE, pdTRUE, sCheckVariables, and semtstNUM_TASKS.
|
static |
Referenced by portTASK_FUNCTION(), and xAreSemaphoreTasksStillRunning().
|
static |
Referenced by portTASK_FUNCTION().