score: Relax <sys/lock.h> static assertions

Only require that the Newlib defined structure is big enough.
This commit is contained in:
Sebastian Huber
2016-12-23 13:54:11 +01:00
parent 0374ccd8ab
commit a7cfb4bda0
5 changed files with 9 additions and 9 deletions

View File

@@ -41,7 +41,7 @@ RTEMS_STATIC_ASSERT(
); );
RTEMS_STATIC_ASSERT( RTEMS_STATIC_ASSERT(
sizeof( Condition_Control ) == sizeof( struct _Condition_Control ), sizeof( Condition_Control ) <= sizeof( struct _Condition_Control ),
CONDITION_CONTROL_SIZE CONDITION_CONTROL_SIZE
); );

View File

@@ -39,7 +39,7 @@ RTEMS_STATIC_ASSERT(
); );
RTEMS_STATIC_ASSERT( RTEMS_STATIC_ASSERT(
sizeof( Futex_Control ) == sizeof( struct _Futex_Control ), sizeof( Futex_Control ) <= sizeof( struct _Futex_Control ),
FUTEX_CONTROL_SIZE FUTEX_CONTROL_SIZE
); );

View File

@@ -39,7 +39,7 @@ RTEMS_STATIC_ASSERT(
); );
RTEMS_STATIC_ASSERT( RTEMS_STATIC_ASSERT(
sizeof( Mutex_Control ) == sizeof( struct _Mutex_Control ), sizeof( Mutex_Control ) <= sizeof( struct _Mutex_Control ),
MUTEX_CONTROL_SIZE MUTEX_CONTROL_SIZE
); );
@@ -50,19 +50,19 @@ typedef struct {
RTEMS_STATIC_ASSERT( RTEMS_STATIC_ASSERT(
offsetof( Mutex_recursive_Control, Mutex ) offsetof( Mutex_recursive_Control, Mutex )
== offsetof( struct _Mutex_recursive_Control, _Mutex ), <= offsetof( struct _Mutex_recursive_Control, _Mutex ),
MUTEX_RECURSIVE_CONTROL_MUTEX MUTEX_RECURSIVE_CONTROL_MUTEX
); );
RTEMS_STATIC_ASSERT( RTEMS_STATIC_ASSERT(
offsetof( Mutex_recursive_Control, nest_level ) offsetof( Mutex_recursive_Control, nest_level )
== offsetof( struct _Mutex_recursive_Control, _nest_level ), <= offsetof( struct _Mutex_recursive_Control, _nest_level ),
MUTEX_RECURSIVE_CONTROL_NEST_LEVEL MUTEX_RECURSIVE_CONTROL_NEST_LEVEL
); );
RTEMS_STATIC_ASSERT( RTEMS_STATIC_ASSERT(
sizeof( Mutex_recursive_Control ) sizeof( Mutex_recursive_Control )
== sizeof( struct _Mutex_recursive_Control ), <= sizeof( struct _Mutex_recursive_Control ),
MUTEX_RECURSIVE_CONTROL_SIZE MUTEX_RECURSIVE_CONTROL_SIZE
); );

View File

@@ -39,12 +39,12 @@ RTEMS_STATIC_ASSERT(
RTEMS_STATIC_ASSERT( RTEMS_STATIC_ASSERT(
offsetof( Semaphore_Control, count ) offsetof( Semaphore_Control, count )
== offsetof( struct _Semaphore_Control, _count ), <= offsetof( struct _Semaphore_Control, _count ),
SEMAPHORE_CONTROL_COUNT SEMAPHORE_CONTROL_COUNT
); );
RTEMS_STATIC_ASSERT( RTEMS_STATIC_ASSERT(
sizeof( Semaphore_Control ) == sizeof( struct _Semaphore_Control ), sizeof( Semaphore_Control ) <= sizeof( struct _Semaphore_Control ),
SEMAPHORE_CONTROL_SIZE SEMAPHORE_CONTROL_SIZE
); );

View File

@@ -58,7 +58,7 @@ RTEMS_STATIC_ASSERT(
RTEMS_STATIC_ASSERT( RTEMS_STATIC_ASSERT(
sizeof( Thread_queue_Syslock_queue ) sizeof( Thread_queue_Syslock_queue )
== sizeof( struct _Thread_queue_Queue ), <= sizeof( struct _Thread_queue_Queue ),
THREAD_QUEUE_SYSLOCK_QUEUE_SIZE THREAD_QUEUE_SYSLOCK_QUEUE_SIZE
); );