source: rtems/c/src/exec/score/include/rtems/score/tqdata.h @ 45819022

4.104.114.84.95
Last change on this file since 45819022 was 45819022, checked in by Joel Sherrill <joel.sherrill@…>, on 08/16/95 at 19:42:41

bug fixes to make macro implementations work

  • Property mode set to 100644
File size: 2.4 KB
Line 
1/*  tqdata.h
2 *
3 *  This include file contains all the constants and structures
4 *  needed to declare a thread queue.
5 *
6 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
7 *  On-Line Applications Research Corporation (OAR).
8 *  All rights assigned to U.S. Government, 1994.
9 *
10 *  This material may be reproduced by or for the U.S. Government pursuant
11 *  to the copyright license under the clause at DFARS 252.227-7013.  This
12 *  notice must appear in all copies of this file and its derivatives.
13 *
14 *  tqdata.h,v 1.2 1995/05/31 16:47:42 joel Exp
15 */
16
17#ifndef __RTEMS_THREAD_QUEUE_DATA_h
18#define __RTEMS_THREAD_QUEUE_DATA_h
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
24#include <rtems/chain.h>
25#include <rtems/priority.h>
26#include <rtems/states.h>
27
28/*
29 *  The following enumerated type details all of the disciplines
30 *  supported by the Thread Queue Handler.
31 */
32
33typedef enum {
34  THREAD_QUEUE_DATA_FIFO_DISCIPLINE,     /* RTEMS_FIFO queue discipline */
35  THREAD_QUEUE_DATA_PRIORITY_DISCIPLINE  /* RTEMS_PRIORITY queue discipline */
36}   Thread_queue_Disciplines;
37
38/*
39 *  The following record defines the control block used
40 *  to manage each thread.
41 */
42
43#define TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS 4   /* # of pri groups */
44
45typedef struct {
46  union {
47    Chain_Control Fifo;                /* FIFO discipline list           */
48    Chain_Control Priority[TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS];
49                                       /* priority discipline list       */
50  } Queues;
51  boolean                  sync;       /* alloc/dealloc critical section */
52  Thread_queue_Disciplines discipline; /* queue discipline               */
53  States_Control           state;      /* state of threads on Thread_q   */
54}   Thread_queue_Control;
55
56/*
57 *  _Thread_queue_Header_number
58 *
59 *  DESCRIPTION:
60 *
61 *  This function returns the index of the priority chain on which
62 *  a thread of the_priority should be placed.
63 */
64
65STATIC INLINE unsigned32 _Thread_queue_Header_number (
66  rtems_task_priority the_priority
67);
68
69/*
70 *  _Thread_queue_Is_reverse_search
71 *
72 *  DESCRIPTION:
73 *
74 *  This function returns TRUE if the_priority indicates that the
75 *  enqueue search should start at the front of this priority
76 *  group chain, and FALSE if the search should start at the rear.
77 */
78
79STATIC INLINE boolean _Thread_queue_Is_reverse_search (
80  rtems_task_priority the_priority
81);
82
83#include <rtems/tqdata.inl>
84
85#ifdef __cplusplus
86}
87#endif
88
89#endif
90/* end of include file */
Note: See TracBrowser for help on using the repository browser.