source: rtems/cpukit/posix/include/rtems/posix/pthread.h @ 277cc95

4.104.114.84.95
Last change on this file since 277cc95 was 8e36f29, checked in by Joel Sherrill <joel.sherrill@…>, on 09/04/03 at 18:54:26

2003-09-04 Joel Sherrill <joel@…>

  • include/rtems/posix/cond.h, include/rtems/posix/condmp.h, include/rtems/posix/config.h, include/rtems/posix/intr.h, include/rtems/posix/key.h, include/rtems/posix/mqueue.h, include/rtems/posix/mqueuemp.h, include/rtems/posix/mutex.h, include/rtems/posix/mutexmp.h, include/rtems/posix/posixapi.h, include/rtems/posix/pthread.h, include/rtems/posix/pthreadmp.h, include/rtems/posix/ptimer.h, include/rtems/posix/semaphore.h, include/rtems/posix/semaphoremp.h, inline/rtems/posix/cond.inl, inline/rtems/posix/intr.inl, inline/rtems/posix/key.inl, inline/rtems/posix/mqueue.inl, inline/rtems/posix/mutex.inl, inline/rtems/posix/pthread.inl, inline/rtems/posix/semaphore.inl, inline/rtems/posix/timer.inl, macros/rtems/posix/cond.inl, macros/rtems/posix/intr.inl, macros/rtems/posix/key.inl, macros/rtems/posix/mqueue.inl, macros/rtems/posix/mutex.inl, macros/rtems/posix/pthread.inl, macros/rtems/posix/semaphore.inl, macros/rtems/posix/timer.inl, src/alarm.c, src/kill.c, src/killinfo.c, src/mqueuetranslatereturncode.c, src/pause.c, src/pthreadattrdestroy.c, src/pthreadattrgetdetachstate.c, src/pthreadattrgetinheritsched.c, src/pthreadattrgetschedparam.c, src/pthreadattrgetschedpolicy.c, src/pthreadattrgetscope.c, src/pthreadattrgetstackaddr.c, src/pthreadattrgetstacksize.c, src/pthreadattrinit.c, src/pthreadattrsetdetachstate.c, src/pthreadattrsetinheritsched.c, src/pthreadattrsetschedparam.c, src/pthreadattrsetschedpolicy.c, src/pthreadattrsetscope.c, src/pthreadattrsetstackaddr.c, src/pthreadattrsetstacksize.c, src/pthreadcreate.c, src/pthreaddetach.c, src/pthreadequal.c, src/pthreadexit.c, src/pthreadgetcpuclockid.c, src/pthreadgetcputime.c, src/pthreadgetschedparam.c, src/pthreadjoin.c, src/pthreadkill.c, src/pthreadonce.c, src/pthreadself.c, src/pthreadsetcputime.c, src/pthreadsetschedparam.c, src/pthreadsigmask.c, src/sigaction.c, src/sigaddset.c, src/sigdelset.c, src/sigemptyset.c, src/sigfillset.c, src/sigismember.c, src/signal_2.c, src/sigpending.c, src/sigprocmask.c, src/sigqueue.c, src/sigsuspend.c, src/sigtimedwait.c, src/sigwait.c, src/sigwaitinfo.c, src/ualarm.c: URL for license changed.
  • Property mode set to 100644
File size: 3.3 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-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.rtems.com/license/LICENSE.
12 *
13 *  $Id$
14 */
15 
16#ifndef __RTEMS_POSIX_THREADS_h
17#define __RTEMS_POSIX_THREADS_h
18 
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23#include <rtems/posix/config.h>
24#include <rtems/posix/threadsup.h>
25
26#define PTHREAD_MINIMUM_STACK_SIZE (STACK_MINIMUM_SIZE * 2)
27
28/*
29 *  The following defines the information control block used to manage
30 *  this class of objects.
31 */
32 
33POSIX_EXTERN Objects_Information  _POSIX_Threads_Information;
34
35/*
36 *  These are used to manage the user initialization threads.
37 */
38 
39POSIX_EXTERN posix_initialization_threads_table
40                   *_POSIX_Threads_User_initialization_threads;
41POSIX_EXTERN unsigned32   _POSIX_Threads_Number_of_initialization_threads;
42
43extern const pthread_attr_t _POSIX_Threads_Default_attributes;
44 
45/*
46 *  _POSIX_Threads_Manager_initialization
47 *
48 *  DESCRIPTION:
49 *
50 *  This routine performs the initialization necessary for this manager.
51 */
52 
53void _POSIX_Threads_Manager_initialization(
54  unsigned32                          maximum_pthreads,
55  unsigned32                          number_of_initialization_threads,
56  posix_initialization_threads_table *user_threads
57);
58 
59/*
60 *  _POSIX_Threads_Allocate
61 *
62 *  DESCRIPTION:
63 *
64 *  This function allocates a pthread control block from
65 *  the inactive chain of free pthread control blocks.
66 */
67 
68RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void );
69 
70/*
71 *  _POSIX_Threads_Free
72 *
73 *  DESCRIPTION:
74 *
75 *  This routine frees a pthread control block to the
76 *  inactive chain of free pthread control blocks.
77 */
78 
79RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free(
80  Thread_Control *the_pthread
81);
82 
83/*
84 *  _POSIX_Threads_Get
85 *
86 *  DESCRIPTION:
87 *
88 *  This function maps pthread IDs to pthread control blocks.
89 *  If ID corresponds to a local pthread, then it returns
90 *  the_pthread control pointer which maps to ID and location
91 *  is set to OBJECTS_LOCAL.  if the pthread ID is global and
92 *  resides on a remote node, then location is set to OBJECTS_REMOTE,
93 *  and the_pthread is undefined.  Otherwise, location is set
94 *  to OBJECTS_ERROR and the_pthread is undefined.
95 */
96 
97RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get(
98  pthread_t          id,
99  Objects_Locations *location
100);
101 
102/*
103 *  _POSIX_Threads_Is_null
104 *
105 *  DESCRIPTION:
106 *
107 *  This function returns TRUE if the_pthread is NULL and FALSE otherwise.
108 */
109 
110RTEMS_INLINE_ROUTINE boolean _POSIX_Threads_Is_null(
111  Thread_Control *the_pthread
112);
113
114/*
115 *  _POSIX_Threads_Sporadic_budget_callout
116 *
117 *  DESCRIPTION:
118 *
119 *  This routine handles the sporadic scheduling algorithm.
120 */
121
122void _POSIX_Threads_Sporadic_budget_callout(
123  Thread_Control *the_thread
124);
125
126/*
127 *  _POSIX_Threads_Sporadic_budget_TSR
128 *
129 *  DESCRIPTION:
130 *
131 *  This routine supports the sporadic scheduling algorithm.
132 */
133
134void _POSIX_Threads_Sporadic_budget_TSR(
135  Objects_Id      id,
136  void           *argument
137);
138
139#include <rtems/posix/pthread.inl>
140#if defined(RTEMS_MULTIPROCESSING)
141#include <rtems/posix/pthreadmp.h>
142#endif
143
144#ifdef __cplusplus
145}
146#endif
147 
148#endif
149/*  end of include file */
150
Note: See TracBrowser for help on using the repository browser.