Rockbox

Tasklist

FS#6441 - queue_send with return value

Attached to Project: Rockbox
Opened by Michael Sevakis (MikeS) - Friday, 15 December 2006, 11:03 GMT
Last edited by Michael Sevakis (MikeS) - Friday, 15 December 2006, 12:19 GMT
Task Type Patches
Category Operating System/Drivers
Status Closed
Assigned To Michael Sevakis (MikeS)
Operating System All players
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Adds synchronous interthread message sending with a return value.

Features:
1) Can be #ifdef-ed away if a target doesn't require the functionality
2) Data is allocated and functionality enabled on a queue by queue basis with queue_enable_queue_send. Only one more pointer member in the event_queue structure
3) Uses scheduler blocking mechanism
4) Minimal overhead in checking if a message is sent or posted. Add one function call (queue_reply) to thread function with sendable queues.
5) Overflow safe
6) Interrupt safe (though interrupts must not call queue_send)
7) A sender knows the reply is for the senders particular post
8) queue_send automatically degrades to queue_post and returns NULL when sending is not enabled on the queue
9) Nets out at 164 bytes with only a single module using it. I expect savings in overall if used throughout when appropriate. callback_queue in playback.c should be able be removed and replaced with sending messages to the audio thread and receiving a return value since additional queues are currently used to implement message return values.

pcm_record.c modifications are included since that will be the first user of the new api.
This task depends upon

Closed by  Michael Sevakis (MikeS)
Saturday, 16 December 2006, 23:13 GMT
Reason for closing:  Accepted
Additional comments about closing:  added changes to CVS after some testing
Comment by Michael Sevakis (MikeS) - Friday, 15 December 2006, 14:55 GMT
Little bug in queue_release_all_senders. Everything else seems in order.
Comment by Michael Sevakis (MikeS) - Friday, 15 December 2006, 15:32 GMT
This version includes the use of queue_send in the elimination of the codec_callback_queue. That resume deadlock is still there which tells me everything is working correctly. This will assist in a proper resolution to playback deadlocks as well.

Loading...