OS  v7.3.3
Documentation
Loading...
Searching...
No Matches
qkshared.h
1
8#ifndef QKSHARED_H
9 #define QKSHARED_H
10
11 #include "qtypes.h"
12 #include "qtasks.h"
13
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17
20 /* Task flags
21 MSB---------------------------------------------------------------------------------------------------------------------------------------------------------LSB
22 | (31..11)EVENTFLAGS | (10..8)-STATE | 7-REM.REQ | 6-SHUTDOWN | 5-QUEUE_EMPTY | 4-QUEUE_COUNT | 3-QUEUE_FULL | 2-QUEUE_RECEIVER | 1-ENABLED | 0-INIT |
23 |------------------------------------------------------------------------------------------------------------------------------------------------------------|
24 */
25 #define QTASK_EVENT_FLAGS_MASK ( (qTask_Flag_t)0xFFFFF000UL )
26 #define QTASK_QUEUE_FLAGS_MASK ( 0x0000003CUL )
27
28 #define QTASK_BIT_INIT ( 0x00000001UL )
29 #define QTASK_BIT_ENABLED ( 0x00000002UL )
30 #define QTASK_BIT_QUEUE_RECEIVER ( 0x00000004UL )
31 #define QTASK_BIT_QUEUE_FULL ( 0x00000008UL )
32 #define QTASK_BIT_QUEUE_COUNT ( 0x00000010UL )
33 #define QTASK_BIT_QUEUE_EMPTY ( 0x00000020UL )
34 #define QTASK_BIT_SHUTDOWN ( 0x00000040UL )
35 #define QTASK_BIT_REMOVE_REQUEST ( 0x00000080UL )
36
37 /*Private kernel shared functions*/
38 #if ( Q_PRIO_QUEUE_SIZE > 0 )
39 extern qBool_t qOS_PriorityQueue_Insert( qTask_t * const Task,
40 void *pData );
41 extern qBool_t qOS_PriorityQueue_IsTaskInside( const qTask_t * const Task );
42 extern size_t qOS_PriorityQueue_GetCount( void );
43 extern void qOS_PriorityQueue_Init( void );
44 #endif
45
46 extern qTask_GlobalState_t qOS_GetTaskGlobalState( const qTask_t * const Task );
47 extern qTask_t* qOS_Get_TaskRunning( void );
48
49 extern qBool_t qOS_Get_TaskFlag( const qTask_t * const Task,
50 const qUINT32_t flag );
51 extern void qOS_Set_TaskFlags( qTask_t * const Task,
52 const qUINT32_t flags,
53 const qBool_t value );
54
55 #if ( Q_ALLOW_TASK_NAMING == 1 )
56 extern qTask_t* qOS_FindTaskByName( const char *name );
57 #endif
58
61 #ifdef __cplusplus
62 }
63 #endif
64
65#endif
qTask_GlobalState_t
An enum to describe the task global states.
Definition qtasks.h:116
qUINT8_t qBool_t
A type to instantiate an OS boolean variable.
Definition qtypes.h:139
uint32_t qUINT32_t
Unsigned integer type with width of exactly 32 bits respectively.
Definition qtypes.h:48
A task node object.
Definition qtasks.h:268