score: Thread life cycle re-implementation

The thread deletion is now supported on SMP.

This change fixes the following PRs:

PR1814: SMP race condition between stack free and dispatch

PR2035: psxcancel reveals NULL pointer access in _Thread_queue_Extract()

The POSIX cleanup handler are now called in the right context (should be
called in the context of the terminating thread).

http://pubs.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_09.html

Add a user extension the reflects a thread termination event.  This is
used to reclaim the Newlib reentrancy structure (may use file
operations), the POSIX cleanup handlers and the POSIX key destructors.
This commit is contained in:
Sebastian Huber
2014-03-25 10:54:49 +01:00
parent 226c731e7a
commit 1b1be254e7
26 changed files with 704 additions and 313 deletions

View File

@@ -135,6 +135,8 @@ static const rtems_assoc_t rtems_monitor_state_assoc[] = {
{ "Wrwlk", STATES_WAITING_FOR_RWLOCK, 0 },
{ "Wisig", STATES_INTERRUPTIBLE_BY_SIGNAL, 0 },
{ "Wwkup", STATES_WAITING_FOR_BSD_WAKEUP, 0 },
{ "Wterm", STATES_WAITING_FOR_TERMINATION, 0 },
{ "ZOMBI", STATES_ZOMBIE, 0 },
{ 0, 0, 0 },
};