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

4.104.114.84.95
Last change on this file since 535db3ae was 535db3ae, checked in by Joel Sherrill <joel.sherrill@…>, on 01/25/99 at 23:20:39

Added enough prototypes to allow most of POSIX Threads Manager to be
split into multiple files.

  • Property mode set to 100644
File size: 3.4 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-1998.
7 *  On-Line Applications Research Corporation (OAR).
8 *  Copyright assigned to U.S. Government, 1994.
9 *
10 *  The license and distribution terms for this file may be
11 *  found in the file LICENSE in this distribution or at
12 *  http://www.OARcorp.com/rtems/license.html.
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#define PTHREAD_MINIMUM_STACK_SIZE (STACK_MINIMUM_SIZE * 2)
28
29/*
30 *  The following defines the information control block used to manage
31 *  this class of objects.
32 */
33 
34POSIX_EXTERN Objects_Information  _POSIX_Threads_Information;
35
36/*
37 *  These are used to manage the user initialization threads.
38 */
39 
40POSIX_EXTERN posix_initialization_threads_table
41                   *_POSIX_Threads_User_initialization_threads;
42POSIX_EXTERN unsigned32   _POSIX_Threads_Number_of_initialization_threads;
43
44extern const pthread_attr_t _POSIX_Threads_Default_attributes;
45 
46/*
47 *  _POSIX_Threads_Manager_initialization
48 *
49 *  DESCRIPTION:
50 *
51 *  This routine performs the initialization necessary for this manager.
52 */
53 
54void _POSIX_Threads_Manager_initialization(
55  unsigned32                          maximum_pthreads,
56  unsigned32                          number_of_initialization_threads,
57  posix_initialization_threads_table *user_threads
58);
59 
60/*
61 *  _POSIX_Threads_Allocate
62 *
63 *  DESCRIPTION:
64 *
65 *  This function allocates a pthread control block from
66 *  the inactive chain of free pthread control blocks.
67 */
68 
69RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void );
70 
71/*
72 *  _POSIX_Threads_Free
73 *
74 *  DESCRIPTION:
75 *
76 *  This routine frees a pthread control block to the
77 *  inactive chain of free pthread control blocks.
78 */
79 
80RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free(
81  Thread_Control *the_pthread
82);
83 
84/*
85 *  _POSIX_Threads_Get
86 *
87 *  DESCRIPTION:
88 *
89 *  This function maps pthread IDs to pthread control blocks.
90 *  If ID corresponds to a local pthread, then it returns
91 *  the_pthread control pointer which maps to ID and location
92 *  is set to OBJECTS_LOCAL.  if the pthread ID is global and
93 *  resides on a remote node, then location is set to OBJECTS_REMOTE,
94 *  and the_pthread is undefined.  Otherwise, location is set
95 *  to OBJECTS_ERROR and the_pthread is undefined.
96 */
97 
98RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get(
99  pthread_t          id,
100  Objects_Locations *location
101);
102 
103/*
104 *  _POSIX_Threads_Is_null
105 *
106 *  DESCRIPTION:
107 *
108 *  This function returns TRUE if the_pthread is NULL and FALSE otherwise.
109 */
110 
111RTEMS_INLINE_ROUTINE boolean _POSIX_Threads_Is_null(
112  Thread_Control *the_pthread
113);
114
115/*
116 *  _POSIX_Threads_Sporadic_budget_callout
117 *
118 *  DESCRIPTION:
119 *
120 *  This routine handles the sporadic scheduling algorithm.
121 */
122
123void _POSIX_Threads_Sporadic_budget_callout(
124  Thread_Control *the_thread
125);
126
127/*
128 *  _POSIX_Threads_Sporadic_budget_TSR
129 *
130 *  DESCRIPTION:
131 *
132 *  This routine supports the sporadic scheduling algorithm.
133 */
134
135void _POSIX_Threads_Sporadic_budget_TSR(
136  Objects_Id      id,
137  void           *argument
138);
139
140#include <rtems/posix/pthread.inl>
141#if defined(RTEMS_MULTIPROCESSING)
142#include <rtems/posix/pthreadmp.h>
143#endif
144
145#ifdef __cplusplus
146}
147#endif
148 
149#endif
150/*  end of include file */
151
Note: See TracBrowser for help on using the repository browser.