forked from len0rd/rockbox
Enable auto reply for queue messages sent with queue_send. It's only nescessary to use queue_reply to return a value other than zero or to return a result before waiting on the queue again.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14923 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
3f9a9a1a01
commit
035529c487
4 changed files with 36 additions and 15 deletions
|
|
@ -38,8 +38,6 @@ void (*tick_funcs[MAX_NUM_TICK_TASKS])(void);
|
|||
static struct event_queue *all_queues[32] NOCACHEBSS_ATTR;
|
||||
static int num_queues NOCACHEBSS_ATTR;
|
||||
|
||||
void queue_wait(struct event_queue *q, struct event *ev) ICODE_ATTR;
|
||||
|
||||
/****************************************************************************
|
||||
* Standard kernel stuff
|
||||
****************************************************************************/
|
||||
|
|
@ -234,7 +232,15 @@ void queue_wait(struct event_queue *q, struct event *ev)
|
|||
int oldlevel;
|
||||
unsigned int rd;
|
||||
|
||||
oldlevel = set_irq_level(HIGHEST_IRQ_LEVEL);
|
||||
oldlevel = set_irq_level(HIGHEST_IRQ_LEVEL);
|
||||
|
||||
#ifdef HAVE_EXTENDED_MESSAGING_AND_NAME
|
||||
if(q->send && q->send->curr_sender)
|
||||
{
|
||||
/* auto-reply */
|
||||
queue_release_sender(&q->send->curr_sender, 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (q->read == q->write)
|
||||
{
|
||||
|
|
@ -259,6 +265,14 @@ void queue_wait(struct event_queue *q, struct event *ev)
|
|||
void queue_wait_w_tmo(struct event_queue *q, struct event *ev, int ticks)
|
||||
{
|
||||
int oldlevel = set_irq_level(HIGHEST_IRQ_LEVEL);
|
||||
|
||||
#ifdef HAVE_EXTENDED_MESSAGING_AND_NAME
|
||||
if (q->send && q->send->curr_sender)
|
||||
{
|
||||
/* auto-reply */
|
||||
queue_release_sender(&q->send->curr_sender, 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (q->read == q->write && ticks > 0)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue