summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-04-23 15:25:13 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-04-23 21:42:13 +0200
commitf32935335a7f9b53c14133724753045ead988ca4 (patch)
tree168cad23909e4c7920bf798aa5f05f4718ad76c5 /cpukit/score/include
parentsp13/system.h: Account for all message buffers (diff)
downloadrtems-f32935335a7f9b53c14133724753045ead988ca4.tar.bz2
score: Fix POSIX thread join
A thread join is twofold. There is one thread that exists and an arbitrary number of threads that wait for the thread exit (one-to-many relation). The exiting thread may want to wait for a thread that wants to join its exit (STATES_WAITING_FOR_JOIN_AT_EXIT in _POSIX_Thread_Exit()). On the other side we need a thread queue for all the threads that wait for the exit of one particular thread (STATES_WAITING_FOR_JOIN in pthread_join()). Update #2035.
Diffstat (limited to 'cpukit/score/include')
-rw-r--r--cpukit/score/include/rtems/score/statesimpl.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/cpukit/score/include/rtems/score/statesimpl.h b/cpukit/score/include/rtems/score/statesimpl.h
index 074b3528e3..9f94675c89 100644
--- a/cpukit/score/include/rtems/score/statesimpl.h
+++ b/cpukit/score/include/rtems/score/statesimpl.h
@@ -84,6 +84,8 @@ extern "C" {
#define STATES_MIGRATING 0x400000
/** This macro corresponds to a task restarting. */
#define STATES_RESTARTING 0x800000
+/** This macro corresponds to a task waiting for a join. */
+#define STATES_WAITING_FOR_JOIN 0x1000000
/** This macro corresponds to a task which is in an interruptible
* blocking state.
@@ -97,7 +99,7 @@ extern "C" {
STATES_WAITING_FOR_SEMAPHORE | \
STATES_WAITING_FOR_MUTEX | \
STATES_WAITING_FOR_CONDITION_VARIABLE | \
- STATES_WAITING_FOR_JOIN_AT_EXIT | \
+ STATES_WAITING_FOR_JOIN | \
STATES_WAITING_FOR_SIGNAL | \
STATES_WAITING_FOR_BARRIER | \
STATES_WAITING_FOR_BSD_WAKEUP | \