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

4.104.114.84.95
Last change on this file since 1a8fde6c was 1a8fde6c, checked in by Joel Sherrill <joel.sherrill@…>, on 03/06/96 at 21:34:57

Removed prototyes for static inline routines and moved the comments into
the inline implementation. The impetus for this was twofold. First,
it is incorrect to have static inline prototypes when using the macro
implementation. Second, this reduced the number of lines in the include
files seen by rtems.h by about 2000 lines.

Next we restricted visibility for the inline routines to inside the
executive itself EXCEPT for a handful of objects. This reduced the
number of include files included by rtems.h by 40 files and reduced
the lines in the include files seen by rtems.h by about 6000 lines.

In total, these reduced the compile time of the entire RTEMS tree by 20%.
This results in about 8 minutes savings on the SparcStation? 10 morgana.

  • Property mode set to 100644
File size: 2.8 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 *  $Id$
15 */
16
17#ifndef __THREAD_QUEUE_DATA_h
18#define __THREAD_QUEUE_DATA_h
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
24#include <rtems/score/chain.h>
25#include <rtems/score/priority.h>
26#include <rtems/score/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_DISCIPLINE_FIFO,     /* FIFO queue discipline */
35  THREAD_QUEUE_DISCIPLINE_PRIORITY  /* PRIORITY queue discipline */
36}   Thread_queue_Disciplines;
37
38/*
39 *  The following enumerated types indicate what happened while the thread
40 *  queue was in the synchronization window.
41 */
42 
43typedef enum {
44  THREAD_QUEUE_SYNCHRONIZED,
45  THREAD_QUEUE_NOTHING_HAPPENED,
46  THREAD_QUEUE_TIMEOUT,
47  THREAD_QUEUE_SATISFIED
48}  Thread_queue_States;
49
50/*
51 *  The following constants are used to manage the priority queues.
52 *
53 *  There are four chains used to maintain a priority -- each chain
54 *  manages a distinct set of task priorities.  The number of chains
55 *  is determined by TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS.
56 *  The following set must be consistent. 
57 *
58 *  The set below configures 4 headers -- each contains 64 priorities.
59 *  Header x manages priority range (x*64) through ((x*64)+63).  If
60 *  the priority is more than half way through the priority range it
61 *  is in, then the search is performed from the rear of the chain.
62 *  This halves the search time to find the insertion point.
63 */
64
65#define TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS 4   
66#define TASK_QUEUE_DATA_PRIORITIES_PER_HEADER      64
67#define TASK_QUEUE_DATA_REVERSE_SEARCH_MASK        0x20
68
69typedef struct {
70  union {
71    Chain_Control Fifo;                /* FIFO discipline list           */
72    Chain_Control Priority[TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS];
73                                       /* priority discipline list       */
74  } Queues;
75  Thread_queue_States      sync_state; /* alloc/dealloc critical section */
76  Thread_queue_Disciplines discipline; /* queue discipline               */
77  States_Control           state;      /* state of threads on Thread_q   */
78  unsigned32               timeout_status;
79  unsigned32               count;
80}   Thread_queue_Control;
81
82#ifndef __RTEMS_APPLICATION__
83#include <rtems/score/tqdata.inl>
84#endif
85
86#ifdef __cplusplus
87}
88#endif
89
90#endif
91/* end of include file */
Note: See TracBrowser for help on using the repository browser.