source: rtems/cpukit/posix/include/rtems/posix/pthread.h @ 5ec2f12d

4.104.114.84.9
Last change on this file since 5ec2f12d was 5ec2f12d, checked in by Ralf Corsepius <ralf.corsepius@…>, on Feb 21, 2005 at 7:20:13 AM

New header guards.

  • Property mode set to 100644
File size: 3.4 KB
Line 
1/**
2 * @file rtems/posix/pthread.h
3 */
4
5/*  rtems/posix/pthread.h
6 *
7 *  This include file contains all the private support information for
8 *  POSIX threads.
9 *
10 *  COPYRIGHT (c) 1989-1999.
11 *  On-Line Applications Research Corporation (OAR).
12 *
13 *  The license and distribution terms for this file may be
14 *  found in the file LICENSE in this distribution or at
15 *  http://www.rtems.com/license/LICENSE.
16 *
17 *  $Id$
18 */
19
20#ifndef _RTEMS_POSIX_PTHREAD_H
21#define _RTEMS_POSIX_PTHREAD_H
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27#include <rtems/posix/config.h>
28#include <rtems/posix/threadsup.h>
29
30#define PTHREAD_MINIMUM_STACK_SIZE (STACK_MINIMUM_SIZE * 2)
31
32/*
33 *  The following defines the information control block used to manage
34 *  this class of objects.
35 */
36
37POSIX_EXTERN Objects_Information  _POSIX_Threads_Information;
38
39/*
40 *  These are used to manage the user initialization threads.
41 */
42
43POSIX_EXTERN posix_initialization_threads_table
44                   *_POSIX_Threads_User_initialization_threads;
45POSIX_EXTERN uint32_t     _POSIX_Threads_Number_of_initialization_threads;
46
47extern const pthread_attr_t _POSIX_Threads_Default_attributes;
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  uint32_t                            maximum_pthreads,
59  uint32_t                            number_of_initialization_threads,
60  posix_initialization_threads_table *user_threads
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
72RTEMS_INLINE_ROUTINE Thread_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
83RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free(
84  Thread_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
101RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get(
102  pthread_t          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
114RTEMS_INLINE_ROUTINE boolean _POSIX_Threads_Is_null(
115  Thread_Control *the_pthread
116);
117
118/*
119 *  _POSIX_Threads_Sporadic_budget_callout
120 *
121 *  DESCRIPTION:
122 *
123 *  This routine handles the sporadic scheduling algorithm.
124 */
125
126void _POSIX_Threads_Sporadic_budget_callout(
127  Thread_Control *the_thread
128);
129
130/*
131 *  _POSIX_Threads_Sporadic_budget_TSR
132 *
133 *  DESCRIPTION:
134 *
135 *  This routine supports the sporadic scheduling algorithm.
136 */
137
138void _POSIX_Threads_Sporadic_budget_TSR(
139  Objects_Id      id,
140  void           *argument
141);
142
143#include <rtems/posix/pthread.inl>
144#if defined(RTEMS_MULTIPROCESSING)
145#include <rtems/posix/pthreadmp.h>
146#endif
147
148#ifdef __cplusplus
149}
150#endif
151
152#endif
153/*  end of include file */
Note: See TracBrowser for help on using the repository browser.