source: rtems/cpukit/posix/include/rtems/posix/cond.h @ eb33fa54

4.104.114.84.95
Last change on this file since eb33fa54 was eb33fa54, checked in by Joel Sherrill <joel.sherrill@…>, on 12/01/00 at 22:05:32

2000-12-01 Joel Sherrill <joel@…>

  • include/rtems/posix/cond.h: #if 0'ed out prototype of _POSIX_Condition_variables_Get to avoid conflict with macro implementation.
  • Property mode set to 100644
File size: 4.1 KB
Line 
1/*  rtems/posix/cond.h
2 *
3 *  This include file contains all the private support information for
4 *  POSIX condition variables.
5 *
6 *  COPYRIGHT (c) 1989-1999.
7 *  On-Line Applications Research Corporation (OAR).
8 *
9 *  The license and distribution terms for this file may be
10 *  found in the file LICENSE in this distribution or at
11 *  http://www.OARcorp.com/rtems/license.html.
12 *
13 *  $Id$
14 */
15 
16#ifndef __RTEMS_POSIX_CONDITION_VARIABLES_h
17#define __RTEMS_POSIX_CONDITION_VARIABLES_h
18 
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23#include <rtems/score/object.h>
24#include <rtems/score/threadq.h>
25
26/*
27 *  Constant to indicate condition variable does not currently have
28 *  a mutex assigned to it.
29 */
30
31#define POSIX_CONDITION_VARIABLES_NO_MUTEX 0
32
33/*
34 *  Data Structure used to manage a POSIX condition variable
35 */
36 
37typedef struct {
38   Objects_Control       Object;
39   int                   process_shared;
40   pthread_mutex_t       Mutex;
41   Thread_queue_Control  Wait_queue;
42}  POSIX_Condition_variables_Control;
43
44/*
45 *  The following defines the information control block used to manage
46 *  this class of objects.
47 */
48 
49POSIX_EXTERN Objects_Information  _POSIX_Condition_variables_Information;
50
51/*
52 *  The default condition variable attributes structure.
53 */
54
55extern const pthread_condattr_t _POSIX_Condition_variables_Default_attributes;
56 
57/*
58 *  _POSIX_Condition_variables_Manager_initialization
59 *
60 *  DESCRIPTION:
61 *
62 *  This routine performs the initialization necessary for this manager.
63 */
64 
65void _POSIX_Condition_variables_Manager_initialization(
66  unsigned32 maximum_condition_variables
67);
68 
69/*
70 *  _POSIX_Condition_variables_Allocate
71 *
72 *  DESCRIPTION:
73 *
74 *  This function allocates a condition variable control block from
75 *  the inactive chain of free condition variable control blocks.
76 */
77 
78RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control *
79  _POSIX_Condition_variables_Allocate( void );
80 
81/*
82 *  _POSIX_Condition_variables_Free
83 *
84 *  DESCRIPTION:
85 *
86 *  This routine frees a condition variable control block to the
87 *  inactive chain of free condition variable control blocks.
88 */
89 
90RTEMS_INLINE_ROUTINE void _POSIX_Condition_variables_Free (
91  POSIX_Condition_variables_Control *the_condition_variable
92);
93 
94/*
95 *  _POSIX_Condition_variables_Get
96 *
97 *  DESCRIPTION:
98 *
99 *  This function maps condition variable IDs to condition variable control
100 *  blocks.  If ID corresponds to a local condition variable, then it returns
101 *  the_condition variable control pointer which maps to ID and location
102 *  is set to OBJECTS_LOCAL.  if the condition variable ID is global and
103 *  resides on a remote node, then location is set to OBJECTS_REMOTE,
104 *  and the_condition variable is undefined.  Otherwise, location is set
105 *  to OBJECTS_ERROR and the_condition variable is undefined.
106 */
107 
108#if 0
109RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get (
110  Objects_Id        *id,
111  Objects_Locations *location
112);
113#endif
114 
115/*
116 *  _POSIX_Condition_variables_Is_null
117 *
118 *  DESCRIPTION:
119 *
120 *  This function returns TRUE if the_condition variable is NULL
121 *  and FALSE otherwise.
122 */
123 
124RTEMS_INLINE_ROUTINE boolean _POSIX_Condition_variables_Is_null (
125  POSIX_Condition_variables_Control *the_condition_variable
126);
127
128/*
129 *  _POSIX_Condition_variables_Signal_support
130 *
131 *  DESCRIPTION:
132 *
133 *  A support routine which implements guts of the broadcast and single task
134 *  wake up version of the "signal" operation.
135 */
136
137int _POSIX_Condition_variables_Signal_support(
138  pthread_cond_t            *cond,
139  boolean                    is_broadcast
140);
141
142/*
143 *  _POSIX_Condition_variables_Wait_support
144 *
145 *  DESCRIPTION:
146 *
147 *  A support routine which implements guts of the blocking, non-blocking, and
148 *  timed wait version of condition variable wait routines.
149 */
150
151int _POSIX_Condition_variables_Wait_support(
152  pthread_cond_t            *cond,
153  pthread_mutex_t           *mutex,
154  Watchdog_Interval          timeout,
155  boolean                    already_timedout
156);
157
158#include <rtems/posix/cond.inl>
159#if defined(RTEMS_MULTIPROCESSING)
160#include <rtems/posix/condmp.h>
161#endif
162
163#ifdef __cplusplus
164}
165#endif
166 
167#endif
168/*  end of include file */
169
Note: See TracBrowser for help on using the repository browser.