1
0
Fork 0
forked from len0rd/rockbox

Comment improvements

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15350 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Brandon Low 2007-10-28 19:19:54 +00:00
parent a8eeff0fee
commit 94b133ad33

View file

@ -212,9 +212,12 @@ buf_ridx == buf_widx means the buffer is empty.
/* Add a new handle to the linked list and return it. It will have become the /* Add a new handle to the linked list and return it. It will have become the
new current handle. new current handle.
data_size must contain the size of what will be in the handle. data_size must contain the size of what will be in the handle.
On return, it's the size available for the handle.
can_wrap tells us whether this type of data may wrap on buffer can_wrap tells us whether this type of data may wrap on buffer
alloc_all tells us if we must immediately be able to allocate data_size alloc_all tells us if we must immediately be able to allocate data_size
returns a valid memory handle if all conditions for allocation are met.
NULL if there memory_handle itself cannot be allocated or if the
data_size cannot be allocated and alloc_all is set. This function
has no side effects if NULL is returned.
*/ */
static struct memory_handle *add_handle(size_t data_size, const bool can_wrap, static struct memory_handle *add_handle(size_t data_size, const bool can_wrap,
const bool alloc_all) const bool alloc_all)
@ -578,6 +581,10 @@ static ssize_t buffer_handle(int handle_id)
h->filerem -= rc; h->filerem -= rc;
/* Stop buffering if new queue events have arrived */ /* Stop buffering if new queue events have arrived */
/* FIXME: This may sleep, if it does it will untrigger the
* cpu boost for this thread. If the codec's low data
* situation was very short lived that could leave us filling
* w/o boost */
if (yield_codec()) if (yield_codec())
break; break;
} }