summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/include/rtems/posix/threadsup.h
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-05-22 20:38:03 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-05-22 20:38:03 +0000
commit345fc11da9dcad5faa23f9888c8f3a0260e8ad45 (patch)
tree561c791f8d6342c00391dea6c1dd47f08ac82612 /cpukit/posix/include/rtems/posix/threadsup.h
parent2008-05-22 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-345fc11da9dcad5faa23f9888c8f3a0260e8ad45.tar.bz2
2008-05-22 Joel Sherrill <joel.sherrill@oarcorp.com>
* itron/include/rtems/itron/task.h, itron/src/del_tsk.c, itron/src/exd_tsk.c, itron/src/task.c, posix/include/rtems/posix/threadsup.h, posix/src/cancel.c, posix/src/cancelrun.c, posix/src/pthread.c, posix/src/pthreadexit.c, posix/src/setcancelstate.c, posix/src/setcanceltype.c, posix/src/testcancel.c, rtems/src/taskdelete.c, score/inline/rtems/score/object.inl, score/src/objectclose.c, score/src/threadclose.c: Make all task delete/exit/cancel routines follow the same critical section pattern. Also ensure that POSIX cancelation routines are run at thread exit.
Diffstat (limited to '')
-rw-r--r--cpukit/posix/include/rtems/posix/threadsup.h49
1 files changed, 45 insertions, 4 deletions
diff --git a/cpukit/posix/include/rtems/posix/threadsup.h b/cpukit/posix/include/rtems/posix/threadsup.h
index a9e2b97ee0..e0d5ce9132 100644
--- a/cpukit/posix/include/rtems/posix/threadsup.h
+++ b/cpukit/posix/include/rtems/posix/threadsup.h
@@ -3,7 +3,7 @@
*/
/*
- * COPYRIGHT (c) 1989-2007.
+ * COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -20,27 +20,68 @@
#include <rtems/score/coresem.h>
#include <rtems/score/tqdata.h>
+/*!
+ * This defines the POSIX API support structure associated with
+ * each thread in a system with POSIX configured.
+ */
typedef struct {
+ /** This is the POSIX threads attribute set. */
pthread_attr_t Attributes;
+ /** This indicates whether the thread is attached or detached. */
int detachstate;
+ /** This is the set of threads waiting for the thread to exit. */
Thread_queue_Control Join_List;
+ /** This is the thread's current scheduling policy. */
int schedpolicy;
+ /** This is the thread's current set of scheduling parameters. */
struct sched_param schedparam;
+ /**
+ * This is the high priority to execute at when using the sporadic
+ * scheduler.
+ */
int ss_high_priority;
+ /**
+ * This is the timer which controls when the thread executes at
+ * high and low priority when using the sporadic scheduler.
+ */
Watchdog_Control Sporadic_timer;
+ /** This is the set of signals which are currently blocked. */
sigset_t signals_blocked;
+ /** This is the set of signals which are currently pending. */
sigset_t signals_pending;
- /*
- * POSIX Cancelability
- */
+ /*******************************************************************/
+ /*******************************************************************/
+ /*************** POSIX Cancelability ***************/
+ /*******************************************************************/
+ /*******************************************************************/
+
+ /** This is the cancelability state. */
int cancelability_state;
+ /** This is the cancelability type. */
int cancelability_type;
+ /** This indicates if a cancelation has been requested. */
int cancelation_requested;
+ /** This is the set of cancelation handlers. */
Chain_Control Cancellation_Handlers;
} POSIX_API_Control;
+/*!
+ * @brief POSIX Thread Exit Shared Helper
+ *
+ * This method is a helper routine which ensures that all
+ * POSIX thread calls which result in a thread exiting will
+ * do so in the same manner.
+ *
+ * @param[in] the_thread is the thread exiting or being canceled
+ * @param[in] value_ptr is the value to be returned by the thread
+ */
+void _POSIX_Thread_Exit(
+ Thread_Control *the_thread,
+ void *value_ptr
+);
+
#endif
/* end of include file */