HALFRED  0.4.0
Macros | Typedefs | Enumerations | Functions
hal_os_task.h File Reference

OS task API. More...

Detailed Description

OS task API.

HAL OS task API.

Purpose
HALFRED Hardware Abstraction Layer
Version
Revision
1502
License
$License$
#include <stddef.h>
#include <stdbool.h>

Go to the source code of this file.

Macros

#define HAL_OSTASK_BASIC   0
 
#define HAL_OSTASK_JOINABLE   1
 
#define HAL_OSTASK_MORTAL   2
 
#define HAL_OSTASK_SLEEPY   4
 

Typedefs

typedef int(* OSTaskFunction )(void *arg)
 Type that defines the task function.
 
typedef struct OSTaskDescOSTask
 Type describing task handle that identifies a task.
 

Enumerations

enum  OSTaskPriority {
  HAL_OSTASK_PRIORITY_NORMAL = 0, HAL_OSTASK_PRIORITY_LOWEST, HAL_OSTASK_PRIORITY_LOW, HAL_OSTASK_PRIORITY_HIGH,
  HAL_OSTASK_PRIORITY_HIGHEST
}
 Possible task priorities. More...
 

Functions

OSTask OSTASK_Create (OSTaskFunction taskFunc, int features, OSTaskPriority priority, size_t stack_size, void *arg)
 
bool OSTASK_IsValid (OSTask task)
 
bool OSTASK_IsJoinable (OSTask task)
 
bool OSTASK_IsMortal (OSTask task)
 
bool OSTASK_IsSleepy (OSTask task)
 
bool OSTASK_Join (OSTask task, OSTime timeout, int *result)
 
void OSTASK_Kill (OSTask task)
 
bool OSTASK_IsAlive ()
 
void OSTASK_Wakeup (OSTask task)
 
bool OSTASK_SleepIfNotWoken (OSTime maxSleepTime)
 
void OSTASK_Destroy (OSTask task)
 
bool OSTASK_Suspend (OSTask task)
 
bool OSTASK_Resume (OSTask task)
 
void OSTASK_Yield (void)
 
OSTaskPriority OSTASK_GetPriority (OSTask task)
 
bool OSTASK_SetPriority (OSTask task, OSTaskPriority priority)
 
OSTask OSTASK_GetCurrentTask (void)