2009-06-29 Joel Sherrill <joel.sherrill@oarcorp.com>

* posix/src/killinfo.c, posix/src/mutexinit.c, posix/src/psignal.c,
	posix/src/psignalchecksignal.c, posix/src/pthread.c,
	posix/src/pthreadexit.c, posix/src/pthreadinitthreads.c: Remove
	includes of <assert.h> where possible. Make other uses conditional on
	ifdef RTEMS_DEBUG.
This commit is contained in:
Joel Sherrill
2009-06-29 23:19:28 +00:00
parent 89c3f8498f
commit 290d2b79fe
8 changed files with 26 additions and 20 deletions
+8
View File
@@ -1,3 +1,11 @@
2009-06-29 Joel Sherrill <joel.sherrill@oarcorp.com>
* posix/src/killinfo.c, posix/src/mutexinit.c, posix/src/psignal.c,
posix/src/psignalchecksignal.c, posix/src/pthread.c,
posix/src/pthreadexit.c, posix/src/pthreadinitthreads.c: Remove
includes of <assert.h> where possible. Make other uses conditional on
ifdef RTEMS_DEBUG.
2009-06-24 Joel Sherrill <joel.sherrill@oarcorp.com>
* posix/Makefile.am, posix/include/rtems/posix/priority.h,
-1
View File
@@ -18,7 +18,6 @@
#include <pthread.h>
#include <signal.h>
#include <errno.h>
#include <assert.h>
#include <rtems/system.h>
#include <rtems/posix/pthread.h>
+7 -8
View File
@@ -13,7 +13,6 @@
#include "config.h"
#endif
#include <assert.h>
#include <errno.h>
#include <pthread.h>
@@ -50,7 +49,6 @@ int pthread_mutex_init(
else the_attr = &_POSIX_Mutex_Default_attributes;
/* Check for NULL mutex */
if ( !mutex )
return EINVAL;
@@ -98,18 +96,17 @@ int pthread_mutex_init(
return EINVAL;
/*
* XXX: Be careful about attributes when global!!!
* We only support process private mutexes.
*/
assert( the_attr->process_shared == PTHREAD_PROCESS_PRIVATE );
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
return ENOSYS;
if ( the_attr->process_shared != PTHREAD_PROCESS_PRIVATE )
return EINVAL;
/*
* Determine the discipline of the mutex
*/
switch ( the_attr->protocol ) {
case PTHREAD_PRIO_NONE:
the_discipline = CORE_MUTEX_DISCIPLINES_FIFO;
@@ -127,6 +124,9 @@ int pthread_mutex_init(
if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) )
return EINVAL;
/*
* Enter a dispatching critical section and begin to do the real work.
*/
_Thread_Disable_dispatch();
the_mutex = _POSIX_Mutex_Allocate();
@@ -152,7 +152,6 @@ int pthread_mutex_init(
/*
* Must be initialized to unlocked.
*/
_CORE_mutex_Initialize(
&the_mutex->Mutex,
the_mutex_attr,
+8 -7
View File
@@ -13,7 +13,9 @@
#include "config.h"
#endif
#include <assert.h>
#if defined(RTEMS_DEBUG)
#include <assert.h>
#endif
#include <errno.h>
#include <pthread.h>
#include <signal.h>
@@ -172,9 +174,11 @@ void _POSIX_signals_Manager_Initialization(void)
* Ensure we have the same number of vectors and default vector entries
*/
assert(
sizeof(_POSIX_signals_Vectors) == sizeof(_POSIX_signals_Default_vectors)
);
#if defined(RTEMS_DEBUG)
assert(
sizeof(_POSIX_signals_Vectors) == sizeof(_POSIX_signals_Default_vectors)
);
#endif
memcpy(
_POSIX_signals_Vectors,
@@ -185,13 +189,11 @@ void _POSIX_signals_Manager_Initialization(void)
/*
* Initialize the set of pending signals for the entire process
*/
sigemptyset( &_POSIX_signals_Pending );
/*
* Initialize the queue we use to block for signals
*/
_Thread_queue_Initialize(
&_POSIX_signals_Wait_queue,
THREAD_QUEUE_DISCIPLINE_PRIORITY,
@@ -204,7 +206,6 @@ void _POSIX_signals_Manager_Initialization(void)
/*
* Allocate the siginfo pools.
*/
for ( signo=1 ; signo<= SIGRTMAX ; signo++ )
_Chain_Initialize_empty( &_POSIX_signals_Siginfo[ signo ] );
+3 -1
View File
@@ -13,7 +13,9 @@
#include "config.h"
#endif
#include <assert.h>
#if defined(RTEMS_DEBUG)
#include <assert.h>
#endif
#include <errno.h>
#include <pthread.h>
#include <signal.h>
-1
View File
@@ -13,7 +13,6 @@
#include "config.h"
#endif
#include <assert.h>
#include <errno.h>
#include <pthread.h>
#include <limits.h>
-1
View File
@@ -19,7 +19,6 @@
#include <pthread.h>
#include <errno.h>
#include <assert.h>
#include <rtems/system.h>
#include <rtems/score/apimutex.h>
-1
View File
@@ -13,7 +13,6 @@
#include "config.h"
#endif
#include <assert.h>
#include <errno.h>
#include <pthread.h>
#include <limits.h>