CooCox 1.1.4 on mbed with simple blinky example

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

OsTask.h File Reference

OsTask.h File Reference

Header file related to task. More...

Go to the source code of this file.

Data Structures

struct  TCB
 Task control blcok. More...

Functions

void Schedule (void)
 Schedule function.
void IdleTask (void *pdata)
void InsertToTCBRdyList (P_OSTCB tcbInser)
 Insert a task to the ready list.
void RemoveFromTCBRdyList (P_OSTCB ptcb)
 Remove a task from the READY list.
void CreateTCBList (void)
 Create a TCB list.
void ActiveTaskPri (U8 pri)
 Active priority in queue.
void DeleteTaskPri (U8 pri)
 Delete priority in queue.

Variables

P_OSTCB FreeTCB
OSTCB TCBTbl [CFG_MAX_USER_TASKS+SYS_TASK_NUM]
P_OSTCB TCBRdy
P_OSTCB TCBNext
P_OSTCB TCBRunning
U64 OSCheckTime
volatile U8 OSIntNesting
volatile U8 OSSchedLock

Detailed Description

Header file related to task.

Version:
V1.1.4
Date:
2011.04.20

This file including some defines and function declare related to task.

INTERNAL FILE,DON'T PUBLIC.

© COPYRIGHT 2009 CooCox

Definition in file OsTask.h.


Function Documentation

void ActiveTaskPri ( U8  pri )

Active priority in queue.

Parameters:
[in]priTask priority
[in]None
[out]None
Return values:
None
Description

This function is called in Binary-Scheduling Algorithm to active priority in queue, if this priority had been in activation, increate the task num for this priority.

Definition at line 296 of file task.c.

void CreateTCBList ( void   )

Create a TCB list.

Parameters:
[in]None
[out]None
Return values:
None
Description

This function is called by CoOSInit() to initial the empty list of OS_TCBS,supply a pointer to free TCB.

Definition at line 55 of file task.c.

void DeleteTaskPri ( U8  pri )

Delete priority in queue.

Parameters:
[in]priTask priority
[in]None
[out]None
Return values:
None
Description

This function is called in Binary-Scheduling Algorithm to decrease the task num for this priority, if the num goto 0, remove the priority for queue.

Definition at line 335 of file task.c.

void IdleTask ( void *  pdata )

IDLE task code

void InsertToTCBRdyList ( P_OSTCB  tcbInsert )

Insert a task to the ready list.

Parameters:
[in]tcbInsertA pointer to task will be inserted.
[out]None
Return values:
None
Description

This function is called to insert a task to the READY list.

Definition at line 368 of file task.c.

void RemoveFromTCBRdyList ( P_OSTCB  ptcb )

Remove a task from the READY list.

Parameters:
[in]ptcbA pointer to task which be removed.
[out]None
Return values:
None
Description

This function is called to remove a task from the READY list.

Definition at line 491 of file task.c.

void Schedule ( void   )

Schedule function.

Schedule function

Parameters:
[in]None
[out]None
Return values:
None
Description

This function is called by every where need to switch context, It is schedule function of OS kernel.

Definition at line 710 of file task.c.


Variable Documentation

A pointer to free TCB.

pointer to free TCB

Definition at line 28 of file task.c.

The counter of system tick.

Definition at line 32 of file task.c.

volatile U8 OSIntNesting

Use to indicate interrupt nesting level.

Use to indicate interrupt nesting level

Definition at line 20 of file core.c.

volatile U8 OSSchedLock

Schedule is lock(LOCK) or unlock(UN_LOCK).

Task Switch lock.

Definition at line 21 of file core.c.

A pointer to TCB next be scheduled.

Poniter to task that next scheduled by OS

Definition at line 30 of file task.c.

A pointer to TCB that is ready status

Pointer to the READY list.

Definition at line 29 of file task.c.

A pointer to TCB that is running.

Pointer to TCB that current running task.

Definition at line 31 of file task.c.

OSTCB TCBTbl[CFG_MAX_USER_TASKS+SYS_TASK_NUM]

< Table use to save TCB pointer. The stack of IDLE task.

Definition at line 23 of file task.c.