source: rtems/cpukit/posix/include/rtems/posix/pthread.h @ 976162a6

4.104.114.95
Last change on this file since 976162a6 was 976162a6, checked in by Joel Sherrill <joel.sherrill@…>, on 12/03/07 at 22:23:13

2007-12-03 Joel Sherrill <joel.sherrill@…>

  • libcsupport/src/malloc.c, libmisc/monitor/mon-command.c, posix/preinstall.am, posix/include/rtems/posix/cond.h, posix/include/rtems/posix/mqueue.h, posix/include/rtems/posix/mutex.h, posix/include/rtems/posix/pthread.h, posix/include/rtems/posix/semaphore.h, posix/src/conddestroy.c, posix/src/mutexdestroy.c, posix/src/mutexinit.c, posix/src/mutexsetprioceiling.c, posix/src/mutexunlock.c, sapi/include/confdefs.h, sapi/include/rtems/config.h, sapi/include/rtems/init.h, sapi/include/rtems/sptables.h, sapi/src/exinit.c, score/include/rtems/system.h, score/include/rtems/score/mpci.h, score/src/mpci.c, score/src/thread.c, score/src/threadcreateidle.c, score/src/threadstackallocate.c, score/src/threadstackfree.c, score/src/wkspace.c: Moved most of the remaining CPU Table fields to the Configuration Table. This included pretasking_hook, predriver_hook, postdriver_hook, idle_task, do_zero_of_workspace, extra_mpci_receive_server_stack, stack_allocate_hook, and stack_free_hook. As a side-effect of this effort some multiprocessing code was made conditional and some style clean up occurred.
  • Property mode set to 100644
File size: 3.3 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
145#ifdef __cplusplus
146}
147#endif
148
149#endif
150/*  end of include file */
Note: See TracBrowser for help on using the repository browser.