diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2017-12-17 18:49:24 -0500 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2017-12-17 18:49:24 -0500 |
commit | 786fbbfa20e106f9d19607d841e74116ee2b608a (patch) | |
tree | 056f476e7c05c5bbdc9e7c636f5402816813eef5 | |
parent | 95ec1f7a6fc38ce978c51c7453a21271926d2658 (diff) | |
download | rockbox-786fbbfa20e106f9d19607d841e74116ee2b608a.tar.gz rockbox-786fbbfa20e106f9d19607d841e74116ee2b608a.zip |
Buffering: Get rid of disabled code I have no intention of using
Change-Id: I0e5a20e042291180391b0b0059e44705c256d3e5
-rw-r--r-- | apps/buffering.c | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/apps/buffering.c b/apps/buffering.c index 027d33a486..71f991efae 100644 --- a/apps/buffering.c +++ b/apps/buffering.c | |||
@@ -1127,14 +1127,7 @@ int bufalloc(const void *src, size_t size, enum data_type type) | |||
1127 | bool bufclose(int handle_id) | 1127 | bool bufclose(int handle_id) |
1128 | { | 1128 | { |
1129 | logf("bufclose(%d)", handle_id); | 1129 | logf("bufclose(%d)", handle_id); |
1130 | #if 0 | 1130 | |
1131 | /* Don't interrupt the buffering thread if the handle is already | ||
1132 | stale */ | ||
1133 | if (!find_handle(handle_id)) { | ||
1134 | logf(" handle already closed"); | ||
1135 | return true; | ||
1136 | } | ||
1137 | #endif | ||
1138 | if (handle_id <= 0) { | 1131 | if (handle_id <= 0) { |
1139 | return true; | 1132 | return true; |
1140 | } | 1133 | } |
@@ -1688,25 +1681,6 @@ static void NORETURN_ATTR buffering_thread(void) | |||
1688 | continue; | 1681 | continue; |
1689 | 1682 | ||
1690 | update_data_counters(NULL); | 1683 | update_data_counters(NULL); |
1691 | #if 0 | ||
1692 | /* TODO: This needs to be fixed to use the idle callback, disable it | ||
1693 | * for simplicity until its done right */ | ||
1694 | #if MEMORYSIZE > 8 | ||
1695 | /* If the disk is spinning, take advantage by filling the buffer */ | ||
1696 | else if (storage_disk_is_active()) { | ||
1697 | if (num_handles > 0 && data_counters.useful <= high_watermark) | ||
1698 | send_event(BUFFER_EVENT_BUFFER_LOW, 0); | ||
1699 | |||
1700 | if (data_counters.remaining > 0 && buf_used() <= high_watermark) { | ||
1701 | /* This is a new fill, shrink the buffer up first */ | ||
1702 | if (!filling) | ||
1703 | shrink_buffer(); | ||
1704 | filling = fill_buffer(); | ||
1705 | update_data_counters(NULL); | ||
1706 | } | ||
1707 | } | ||
1708 | #endif | ||
1709 | #endif | ||
1710 | 1684 | ||
1711 | if (filling) { | 1685 | if (filling) { |
1712 | filling = data_counters.remaining > 0 ? fill_buffer() : false; | 1686 | filling = data_counters.remaining > 0 ? fill_buffer() : false; |