summaryrefslogtreecommitdiffstats
path: root/c/src/exec/posix/src/pthreadexit.c
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/exec/posix/src/pthreadexit.c')
-rw-r--r--c/src/exec/posix/src/pthreadexit.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/c/src/exec/posix/src/pthreadexit.c b/c/src/exec/posix/src/pthreadexit.c
index 35c3c99b33..085db519a7 100644
--- a/c/src/exec/posix/src/pthreadexit.c
+++ b/c/src/exec/posix/src/pthreadexit.c
@@ -17,6 +17,7 @@
#include <pthread.h>
#include <errno.h>
+#include <assert.h>
#include <rtems/system.h>
#include <rtems/score/thread.h>
@@ -30,6 +31,9 @@ void pthread_exit(
the_information = _Objects_Get_information( _Thread_Executing->Object.id );
+ /* This should never happen if _Thread_Get() works right */
+ assert( the_information );
+
_Thread_Disable_dispatch();
_Thread_Executing->Wait.return_argument = (unsigned32 *)value_ptr;