score: Add _Thread_queue_Is_empty()

This commit is contained in:
Sebastian Huber
2016-04-20 06:57:47 +02:00
parent 2dd5e6fb32
commit b46622684a
2 changed files with 8 additions and 1 deletions

View File

@@ -547,6 +547,13 @@ void _Thread_queue_Extract_with_proxy(
Thread_Control *the_thread Thread_Control *the_thread
); );
RTEMS_INLINE_ROUTINE bool _Thread_queue_Is_empty(
const Thread_queue_Queue *queue
)
{
return queue->heads == NULL;
}
/** /**
* @brief Returns the first thread on the thread queue if it exists, otherwise * @brief Returns the first thread on the thread queue if it exists, otherwise
* @c NULL. * @c NULL.

View File

@@ -375,7 +375,7 @@ static rtems_task Init(
test_classic_obj(ctx); test_classic_obj(ctx);
test_posix_obj(ctx); test_posix_obj(ctx);
rtems_test_assert( queue.Queue.heads == NULL ); rtems_test_assert( _Thread_queue_Is_empty( &queue.Queue ) );
TEST_END(); TEST_END();
rtems_test_exit(0); rtems_test_exit(0);