mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
Buffering: Get rid of disabled code I have no intention of using
Change-Id: I0e5a20e042291180391b0b0059e44705c256d3e5
This commit is contained in:
parent
95ec1f7a6f
commit
786fbbfa20
1 changed files with 1 additions and 27 deletions
|
@ -1127,14 +1127,7 @@ int bufalloc(const void *src, size_t size, enum data_type type)
|
||||||
bool bufclose(int handle_id)
|
bool bufclose(int handle_id)
|
||||||
{
|
{
|
||||||
logf("bufclose(%d)", handle_id);
|
logf("bufclose(%d)", handle_id);
|
||||||
#if 0
|
|
||||||
/* Don't interrupt the buffering thread if the handle is already
|
|
||||||
stale */
|
|
||||||
if (!find_handle(handle_id)) {
|
|
||||||
logf(" handle already closed");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
if (handle_id <= 0) {
|
if (handle_id <= 0) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1688,25 +1681,6 @@ static void NORETURN_ATTR buffering_thread(void)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
update_data_counters(NULL);
|
update_data_counters(NULL);
|
||||||
#if 0
|
|
||||||
/* TODO: This needs to be fixed to use the idle callback, disable it
|
|
||||||
* for simplicity until its done right */
|
|
||||||
#if MEMORYSIZE > 8
|
|
||||||
/* If the disk is spinning, take advantage by filling the buffer */
|
|
||||||
else if (storage_disk_is_active()) {
|
|
||||||
if (num_handles > 0 && data_counters.useful <= high_watermark)
|
|
||||||
send_event(BUFFER_EVENT_BUFFER_LOW, 0);
|
|
||||||
|
|
||||||
if (data_counters.remaining > 0 && buf_used() <= high_watermark) {
|
|
||||||
/* This is a new fill, shrink the buffer up first */
|
|
||||||
if (!filling)
|
|
||||||
shrink_buffer();
|
|
||||||
filling = fill_buffer();
|
|
||||||
update_data_counters(NULL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (filling) {
|
if (filling) {
|
||||||
filling = data_counters.remaining > 0 ? fill_buffer() : false;
|
filling = data_counters.remaining > 0 ? fill_buffer() : false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue