source: rtems/c/src/exec/posix/include/rtems/posix/pthread.h @ c627b2a3

4.104.114.84.95
Last change on this file since c627b2a3 was c627b2a3, checked in by Joel Sherrill <joel.sherrill@…>, on 05/28/96 at 21:40:52

split the inclusion of "EXTERN" data based on whether it was sapi,
score, rtems api, or posix api related.

  • Property mode set to 100644
File size: 3.0 KB
Line 
1/*  rtems/posix/pthread.h
2 *
3 *  This include file contains all the private support information for
4 *  POSIX threads.
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 __RTEMS_POSIX_THREADS_h
18#define __RTEMS_POSIX_THREADS_h
19 
20#ifdef __cplusplus
21extern "C" {
22#endif
23
24#include <rtems/posix/config.h>
25#include <rtems/posix/threadsup.h>
26
27/*
28 *  Data Structure used to manage a POSIX thread
29 */
30
31typedef Thread_Control POSIX_Threads_Control;
32 
33/*
34 *  The following defines the information control block used to manage
35 *  this class of objects.
36 */
37 
38POSIX_EXTERN Objects_Information  _POSIX_Threads_Information;
39
40/*
41 *  These are used to manage the user initialization tasks.
42 */
43 
44POSIX_EXTERN posix_initialization_tasks_table
45                   *_POSIX_Threads_User_initialization_tasks;
46POSIX_EXTERN unsigned32   _POSIX_Threads_Number_of_initialization_tasks;
47
48 
49/*
50 *  _POSIX_Threads_Manager_initialization
51 *
52 *  DESCRIPTION:
53 *
54 *  This routine performs the initialization necessary for this manager.
55 */
56 
57void _POSIX_Threads_Manager_initialization(
58  unsigned32                        maximum_pthreads,
59  unsigned32                        number_of_initialization_tasks,
60  posix_initialization_tasks_table *user_tasks
61);
62 
63/*
64 *  _POSIX_Threads_Allocate
65 *
66 *  DESCRIPTION:
67 *
68 *  This function allocates a pthread control block from
69 *  the inactive chain of free pthread control blocks.
70 */
71 
72STATIC INLINE POSIX_Threads_Control *_POSIX_Threads_Allocate( void );
73 
74/*
75 *  _POSIX_Threads_Free
76 *
77 *  DESCRIPTION:
78 *
79 *  This routine frees a pthread control block to the
80 *  inactive chain of free pthread control blocks.
81 */
82 
83STATIC INLINE void _POSIX_Threads_Free (
84  POSIX_Threads_Control *the_pthread
85);
86 
87/*
88 *  _POSIX_Threads_Get
89 *
90 *  DESCRIPTION:
91 *
92 *  This function maps pthread IDs to pthread control blocks.
93 *  If ID corresponds to a local pthread, then it returns
94 *  the_pthread control pointer which maps to ID and location
95 *  is set to OBJECTS_LOCAL.  if the pthread ID is global and
96 *  resides on a remote node, then location is set to OBJECTS_REMOTE,
97 *  and the_pthread is undefined.  Otherwise, location is set
98 *  to OBJECTS_ERROR and the_pthread is undefined.
99 */
100 
101STATIC INLINE POSIX_Threads_Control *_POSIX_Threads_Get (
102  Objects_Id        *id,
103  Objects_Locations *location
104);
105 
106/*
107 *  _POSIX_Threads_Is_null
108 *
109 *  DESCRIPTION:
110 *
111 *  This function returns TRUE if the_pthread is NULL and FALSE otherwise.
112 */
113 
114STATIC INLINE boolean _POSIX_Threads_Is_null (
115  POSIX_Threads_Control *the_pthread
116);
117
118#include <rtems/posix/pthread.inl>
119#include <rtems/posix/pthreadmp.h>
120
121#ifdef __cplusplus
122}
123#endif
124 
125#endif
126/*  end of include file */
127
Note: See TracBrowser for help on using the repository browser.