forked from Imagelibrary/rtems
score: Add _Thread_queue_Is_empty()
This commit is contained in:
@@ -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.
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user