forked from Imagelibrary/rtems
2009-07-02 Joel Sherrill <joel.sherrill@OARcorp.com>
* score/include/rtems/score/coremsg.h, score/src/coremsgflushwait.c: Mark _CORE_message_queue_Flush_waiting_threads with FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API since there is no way to reach it via an API.
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
2009-07-02 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||||
|
|
||||||
|
* score/include/rtems/score/coremsg.h, score/src/coremsgflushwait.c:
|
||||||
|
Mark _CORE_message_queue_Flush_waiting_threads with
|
||||||
|
FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API since there is no way to
|
||||||
|
reach it via an API.
|
||||||
|
|
||||||
2009-07-01 Joel Sherrill <joel.sherrill@OARcorp.com>
|
2009-07-01 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||||
|
|
||||||
* score/include/rtems/score/tod.h: Correct name of parameter.
|
* score/include/rtems/score/tod.h: Correct name of parameter.
|
||||||
|
|||||||
@@ -293,18 +293,20 @@ uint32_t _CORE_message_queue_Flush_support(
|
|||||||
CORE_message_queue_Control *the_message_queue
|
CORE_message_queue_Control *the_message_queue
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
|
||||||
* @brief Flush Waiting Threads.
|
/**
|
||||||
*
|
* @brief Flush Waiting Threads.
|
||||||
* This function flushes the threads which are blocked on
|
*
|
||||||
* @a the_message_queue's pending message queue. They are
|
* This function flushes the threads which are blocked on
|
||||||
* unblocked whether blocked sending or receiving.
|
* @a the_message_queue's pending message queue. They are
|
||||||
*
|
* unblocked whether blocked sending or receiving.
|
||||||
* @param[in] the_message_queue points to the message queue to flush
|
*
|
||||||
*/
|
* @param[in] the_message_queue points to the message queue to flush
|
||||||
void _CORE_message_queue_Flush_waiting_threads(
|
*/
|
||||||
CORE_message_queue_Control *the_message_queue
|
void _CORE_message_queue_Flush_waiting_threads(
|
||||||
);
|
CORE_message_queue_Control *the_message_queue
|
||||||
|
);
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Broadcast a Message to the Message Queue
|
* @brief Broadcast a Message to the Message Queue
|
||||||
|
|||||||
@@ -30,41 +30,43 @@
|
|||||||
#include <rtems/score/thread.h>
|
#include <rtems/score/thread.h>
|
||||||
#include <rtems/score/wkspace.h>
|
#include <rtems/score/wkspace.h>
|
||||||
|
|
||||||
/*PAGE
|
#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
|
||||||
*
|
/*PAGE
|
||||||
* _CORE_message_queue_Flush_waiting_threads
|
|
||||||
*
|
|
||||||
* This function flushes the message_queue's task wait queue. The number
|
|
||||||
* of messages flushed from the queue is returned.
|
|
||||||
*
|
|
||||||
* Input parameters:
|
|
||||||
* the_message_queue - the message_queue to be flushed
|
|
||||||
*
|
|
||||||
* Output parameters:
|
|
||||||
* returns - the number of messages flushed from the queue
|
|
||||||
*/
|
|
||||||
|
|
||||||
void _CORE_message_queue_Flush_waiting_threads(
|
|
||||||
CORE_message_queue_Control *the_message_queue
|
|
||||||
)
|
|
||||||
{
|
|
||||||
/* XXX this is not supported for global message queues */
|
|
||||||
|
|
||||||
/*
|
|
||||||
* IF there are no pending messages,
|
|
||||||
* THEN threads may be blocked waiting to RECEIVE a message,
|
|
||||||
*
|
*
|
||||||
* IF the pending message queue is full
|
* _CORE_message_queue_Flush_waiting_threads
|
||||||
* THEN threads may be blocked waiting to SEND a message
|
|
||||||
*
|
*
|
||||||
* But in either case, we will return "unsatisfied nowait"
|
* This function flushes the message_queue's task wait queue. The number
|
||||||
* to indicate that the blocking condition was not satisfied
|
* of messages flushed from the queue is returned.
|
||||||
* and that the blocking state was canceled.
|
*
|
||||||
|
* Input parameters:
|
||||||
|
* the_message_queue - the message_queue to be flushed
|
||||||
|
*
|
||||||
|
* Output parameters:
|
||||||
|
* returns - the number of messages flushed from the queue
|
||||||
*/
|
*/
|
||||||
|
|
||||||
_Thread_queue_Flush(
|
void _CORE_message_queue_Flush_waiting_threads(
|
||||||
&the_message_queue->Wait_queue,
|
CORE_message_queue_Control *the_message_queue
|
||||||
NULL,
|
)
|
||||||
CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT
|
{
|
||||||
);
|
/* XXX this is not supported for global message queues */
|
||||||
}
|
|
||||||
|
/*
|
||||||
|
* IF there are no pending messages,
|
||||||
|
* THEN threads may be blocked waiting to RECEIVE a message,
|
||||||
|
*
|
||||||
|
* IF the pending message queue is full
|
||||||
|
* THEN threads may be blocked waiting to SEND a message
|
||||||
|
*
|
||||||
|
* But in either case, we will return "unsatisfied nowait"
|
||||||
|
* to indicate that the blocking condition was not satisfied
|
||||||
|
* and that the blocking state was canceled.
|
||||||
|
*/
|
||||||
|
|
||||||
|
_Thread_queue_Flush(
|
||||||
|
&the_message_queue->Wait_queue,
|
||||||
|
NULL,
|
||||||
|
CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT
|
||||||
|
);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user