summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/pthreadexit.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/posix/src/pthreadexit.c')
-rw-r--r--cpukit/posix/src/pthreadexit.c29
1 files changed, 4 insertions, 25 deletions
diff --git a/cpukit/posix/src/pthreadexit.c b/cpukit/posix/src/pthreadexit.c
index 3c4d3ebaaf..53c42ff3d0 100644
--- a/cpukit/posix/src/pthreadexit.c
+++ b/cpukit/posix/src/pthreadexit.c
@@ -9,6 +9,8 @@
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
+ * Copyright (c) 2016 embedded brains GmbH.
+ *
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.org/license/LICENSE.
@@ -20,41 +22,18 @@
#include <pthread.h>
-#include <rtems/posix/pthreadimpl.h>
-#include <rtems/score/assert.h>
-#include <rtems/score/apimutex.h>
#include <rtems/score/threadimpl.h>
-#include <rtems/score/threadqimpl.h>
-void _POSIX_Thread_Exit(
- Thread_Control *the_thread,
- void *value_ptr
-)
+void pthread_exit( void *value_ptr )
{
Thread_Control *executing;
Per_CPU_Control *cpu_self;
- _Assert( _Debug_Is_thread_dispatching_allowed() );
-
cpu_self = _Thread_Dispatch_disable();
executing = _Per_CPU_Get_executing( cpu_self );
- /*
- * Now shut down the thread
- */
- if ( the_thread == executing ) {
- _Thread_Exit( executing, THREAD_LIFE_TERMINATING, value_ptr );
- } else {
- _Thread_Cancel( the_thread, executing, value_ptr );
- }
+ _Thread_Exit( executing, THREAD_LIFE_TERMINATING, value_ptr );
_Thread_Dispatch_enable( cpu_self );
-}
-
-void pthread_exit(
- void *value_ptr
-)
-{
- _POSIX_Thread_Exit( _Thread_Get_executing(), value_ptr );
RTEMS_UNREACHABLE();
}