mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-24 02:57:00 +08:00
Added assert in case _Objects_Get_information fails since this
should NEVER occur.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user