source: rtems/cpukit/posix/include/rtems/posix/cond.h @ 976162a6

4.104.114.9
Last change on this file since 976162a6 was 976162a6, checked in by Joel Sherrill <joel.sherrill@…>, on Dec 3, 2007 at 10:23:13 PM

2007-12-03 Joel Sherrill <joel.sherrill@…>

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