source: rtems/cpukit/posix/include/rtems/posix/pthread.h @ f73fc29

4.104.114.95
Last change on this file since f73fc29 was f73fc29, checked in by Joel Sherrill <joel.sherrill@…>, on 08/18/08 at 19:18:52

2008-08-18 Joel Sherrill <joel.sherrill@…>

  • itron/include/rtems/itron/task.h, itron/src/def_cyc.c, itron/src/task.c, libcsupport/src/newlibc_exit.c, libcsupport/src/sync.c, libfs/src/imfs/imfs_fchmod.c, posix/include/rtems/posix/pthread.h, posix/src/pthread.c, posix/src/sysconf.c, rtems/include/rtems/rtems/tasks.h, rtems/src/tasks.c, score/include/rtems/score/stack.h, score/inline/rtems/score/stack.inl, score/inline/rtems/score/thread.inl, score/src/threadhandler.c: Fix various nested-externs warnings.
  • Property mode set to 100644
File size: 3.7 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/**
31 *  The following sets the minimum stack size for POSIX threads.
32 */
33#define PTHREAD_MINIMUM_STACK_SIZE (_Stack_Minimum() * 2)
34
35/**
36 *  The following defines the information control block used to manage
37 *  this class of objects.
38 */
39
40POSIX_EXTERN Objects_Information  _POSIX_Threads_Information;
41
42/*
43 *  These are used to manage the user initialization threads.
44 */
45
46POSIX_EXTERN posix_initialization_threads_table
47                   *_POSIX_Threads_User_initialization_threads;
48POSIX_EXTERN uint32_t     _POSIX_Threads_Number_of_initialization_threads;
49
50extern const pthread_attr_t _POSIX_Threads_Default_attributes;
51
52/**
53 *  When the user configures a set of POSIX API initialization threads,
54 *  This variable will point to the method used to initialize them.
55 * 
56 *  @note It is instantiated and initialized by confdefs.h based upon
57 *        application requirements.
58 */
59extern void (*_POSIX_Threads_Initialize_user_threads_p)(void);
60
61/*
62 *  _POSIX_Threads_Manager_initialization
63 *
64 *  DESCRIPTION:
65 *
66 *  This routine performs the initialization necessary for this manager.
67 */
68
69void _POSIX_Threads_Manager_initialization(
70  uint32_t                            maximum_pthreads,
71  uint32_t                            number_of_initialization_threads,
72  posix_initialization_threads_table *user_threads
73);
74
75/*
76 *  _POSIX_Threads_Allocate
77 *
78 *  DESCRIPTION:
79 *
80 *  This function allocates a pthread control block from
81 *  the inactive chain of free pthread control blocks.
82 */
83
84RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void );
85
86/*
87 *  _POSIX_Threads_Free
88 *
89 *  DESCRIPTION:
90 *
91 *  This routine frees a pthread control block to the
92 *  inactive chain of free pthread control blocks.
93 */
94
95RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free(
96  Thread_Control *the_pthread
97);
98
99/*
100 *  _POSIX_Threads_Get
101 *
102 *  DESCRIPTION:
103 *
104 *  This function maps pthread IDs to pthread control blocks.
105 *  If ID corresponds to a local pthread, then it returns
106 *  the_pthread control pointer which maps to ID and location
107 *  is set to OBJECTS_LOCAL.  if the pthread ID is global and
108 *  resides on a remote node, then location is set to OBJECTS_REMOTE,
109 *  and the_pthread is undefined.  Otherwise, location is set
110 *  to OBJECTS_ERROR and the_pthread is undefined.
111 */
112
113RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get(
114  pthread_t          id,
115  Objects_Locations *location
116);
117
118/*
119 *  _POSIX_Threads_Is_null
120 *
121 *  DESCRIPTION:
122 *
123 *  This function returns TRUE if the_pthread is NULL and FALSE otherwise.
124 */
125
126RTEMS_INLINE_ROUTINE boolean _POSIX_Threads_Is_null(
127  Thread_Control *the_pthread
128);
129
130/*
131 *  _POSIX_Threads_Sporadic_budget_callout
132 *
133 *  DESCRIPTION:
134 *
135 *  This routine handles the sporadic scheduling algorithm.
136 */
137
138void _POSIX_Threads_Sporadic_budget_callout(
139  Thread_Control *the_thread
140);
141
142/*
143 *  _POSIX_Threads_Sporadic_budget_TSR
144 *
145 *  DESCRIPTION:
146 *
147 *  This routine supports the sporadic scheduling algorithm.
148 */
149
150void _POSIX_Threads_Sporadic_budget_TSR(
151  Objects_Id      id,
152  void           *argument
153);
154
155#include <rtems/posix/pthread.inl>
156
157#ifdef __cplusplus
158}
159#endif
160
161#endif
162/*  end of include file */
Note: See TracBrowser for help on using the repository browser.