Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Patches
  • Category Operating System/Drivers
  • Assigned To
    MikeS
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by MikeS - 2006-12-15
Last edited by MikeS - 2006-12-15

FS#6441 - queue_send with return value

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.

Closed by  MikeS
2006-12-16 23:13
Reason for closing:  Accepted
Additional comments about closing:  

added changes to CVS after some testing

MikeS commented on 2006-12-15 14:55

Little bug in queue_release_all_senders. Everything else seems in order.

MikeS commented on 2006-12-15 15:32

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...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing