RTEMS CPU Kit with SuperCore  4.11.2
threadq.h
Go to the documentation of this file.
1 
10 /*
11  * COPYRIGHT (c) 1989-2014.
12  * On-Line Applications Research Corporation (OAR).
13  *
14  * The license and distribution terms for this file may be
15  * found in the file LICENSE in this distribution or at
16  * http://www.rtems.org/license/LICENSE.
17  */
18 
19 #ifndef _RTEMS_SCORE_THREADQ_H
20 #define _RTEMS_SCORE_THREADQ_H
21 
22 #include <rtems/score/chain.h>
23 #include <rtems/score/isrlock.h>
24 #include <rtems/score/priority.h>
25 #include <rtems/score/rbtree.h>
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
42 typedef struct Thread_Control Thread_Control;
43 
45 
56  Thread_Control *the_thread,
57  Priority_Control new_priority,
58  Thread_queue_Control *the_thread_queue
59 );
60 
69  Thread_queue_Control *the_thread_queue
70 );
71 
81  Thread_queue_Control *the_thread_queue,
82  Thread_Control *the_thread
83 );
84 
94  Thread_queue_Control *the_thread_queue,
95  Thread_Control *the_thread
96 );
97 
109 typedef Thread_Control *( *Thread_queue_First_operation )(
110  Thread_queue_Control *the_thread_queue
111 );
112 
118 typedef struct {
130 
137 
144 
151 
157 
162 typedef enum {
163  THREAD_QUEUE_DISCIPLINE_FIFO, /* FIFO queue discipline */
164  THREAD_QUEUE_DISCIPLINE_PRIORITY /* PRIORITY queue discipline */
166 
175  union {
180  } Queues;
181 
186 
196  ISR_LOCK_MEMBER( Lock )
197 };
198 
201 #ifdef __cplusplus
202 }
203 #endif
204 
205 #endif
206 /* end of include file */
Thread_Control *(* Thread_queue_First_operation)(Thread_queue_Control *the_thread_queue)
Thread queue first operation.
Definition: threadq.h:109
Thread Priority Manipulation Routines.
void(* Thread_queue_Initialize_operation)(Thread_queue_Control *the_thread_queue)
Thread queue initialize operation.
Definition: threadq.h:68
RBTree_Control Priority
This is the set of threads for priority discipline waiting.
Definition: threadq.h:179
const Thread_queue_Operations * operations
The operations for this thread queue.
Definition: threadq.h:185
#define ISR_LOCK_MEMBER(_designator)
Defines an ISR lock member.
Definition: isrlock.h:89
Thread_queue_Priority_change_operation priority_change
Thread queue priority change operation.
Definition: threadq.h:129
This is used to manage a chain.
Definition: chain.h:83
This is the structure used to manage sets of tasks which are blocked waiting to acquire a resource...
Definition: threadq.h:171
Thread_queue_First_operation first
Thread queue first operation.
Definition: threadq.h:155
Thread queue operations.
Definition: threadq.h:118
uint32_t Priority_Control
The following type defines the control block used to manage thread priorities.
Definition: priority.h:56
Chain_Control Fifo
This is the FIFO discipline list.
Definition: threadq.h:177
void(* Thread_queue_Enqueue_operation)(Thread_queue_Control *the_thread_queue, Thread_Control *the_thread)
Thread queue enqueue operation.
Definition: threadq.h:80
Constants and Structures Associated with the Red-Black Tree Handler.
This structure defines the Thread Control Block (TCB).
Definition: thread.h:671
Thread_queue_Extract_operation extract
Thread queue extract operation.
Definition: threadq.h:150
union Thread_queue_Control::@121 Queues
This union contains the data structures used to manage the blocked set of tasks which varies based up...
This is used to manage a RBT.
Definition: rbtree.h:138
Thread_queue_Enqueue_operation enqueue
Thread queue enqueue operation.
Definition: threadq.h:143
Chain Handler API.
void(* Thread_queue_Priority_change_operation)(Thread_Control *the_thread, Priority_Control new_priority, Thread_queue_Control *the_thread_queue)
Thread queue priority change operation.
Definition: threadq.h:55
void(* Thread_queue_Extract_operation)(Thread_queue_Control *the_thread_queue, Thread_Control *the_thread)
Thread queue extract operation.
Definition: threadq.h:93
Thread_queue_Initialize_operation initialize
Thread queue initialize operation.
Definition: threadq.h:136
ISR Locks.
Thread_queue_Disciplines
The following enumerated type details all of the disciplines supported by the Thread Queue Handler...
Definition: threadq.h:162