From 786fbbfa20e106f9d19607d841e74116ee2b608a Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Sun, 17 Dec 2017 18:49:24 -0500 Subject: Buffering: Get rid of disabled code I have no intention of using Change-Id: I0e5a20e042291180391b0b0059e44705c256d3e5 --- apps/buffering.c | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) (limited to 'apps/buffering.c') 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) bool bufclose(int 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) { return true; } @@ -1688,25 +1681,6 @@ static void NORETURN_ATTR buffering_thread(void) continue; 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) { filling = data_counters.remaining > 0 ? fill_buffer() : false; -- cgit v1.2.3