source: rtems/cpukit/posix/include/rtems/posix/pthread.h @ 309e2f6

4.104.115
Last change on this file since 309e2f6 was 309e2f6, checked in by Joel Sherrill <joel.sherrill@…>, on 12/17/08 at 21:23:37

2008-12-17 Joel Sherrill <joel.sherrill@…>

  • posix/include/rtems/posix/barrier.h, posix/include/rtems/posix/cond.h, posix/include/rtems/posix/key.h, posix/include/rtems/posix/mqueue.h, posix/include/rtems/posix/mutex.h, posix/include/rtems/posix/psignal.h, posix/include/rtems/posix/pthread.h, posix/include/rtems/posix/ptimer.h, posix/include/rtems/posix/rwlock.h, posix/include/rtems/posix/semaphore.h, posix/include/rtems/posix/spinlock.h, posix/include/rtems/posix/timer.h, posix/src/cond.c, posix/src/key.c, posix/src/mqueue.c, posix/src/mutex.c, posix/src/pbarrier.c, posix/src/prwlock.c, posix/src/psignal.c, posix/src/pspin.c, posix/src/pthread.c, posix/src/pthreadinitthreads.c, posix/src/ptimer.c, posix/src/semaphore.c, sapi/src/posixapi.c: Convert POSIX manager initialization routines to directly pull parameters from configuration table.
  • Property mode set to 100644
File size: 3.2 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-2008.
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
42extern const pthread_attr_t _POSIX_Threads_Default_attributes;
43
44/**
45 *  When the user configures a set of POSIX API initialization threads,
46 *  This variable will point to the method used to initialize them.
47 * 
48 *  @note It is instantiated and initialized by confdefs.h based upon
49 *        application requirements.
50 */
51extern void (*_POSIX_Threads_Initialize_user_threads_p)(void);
52
53/*
54 *  _POSIX_Threads_Manager_initialization
55 *
56 *  DESCRIPTION:
57 *
58 *  This routine performs the initialization necessary for this manager.
59 */
60
61void _POSIX_Threads_Manager_initialization(void);
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 bool _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
145#ifdef __cplusplus
146}
147#endif
148
149#endif
150/*  end of include file */
Note: See TracBrowser for help on using the repository browser.