summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/tagcache.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/apps/tagcache.c b/apps/tagcache.c
index 7da85578de..5566b17f03 100644
--- a/apps/tagcache.c
+++ b/apps/tagcache.c
@@ -2853,6 +2853,28 @@ static bool delete_entry(long idx_id)
2853 return true; 2853 return true;
2854} 2854}
2855 2855
2856/**
2857 * Returns true if there is an event waiting in the queue
2858 * that requires the current operation to be aborted.
2859 */
2860static bool check_event_queue(void)
2861{
2862 struct event ev;
2863
2864 queue_wait_w_tmo(&tagcache_queue, &ev, 0);
2865 switch (ev.id)
2866 {
2867 case Q_STOP_SCAN:
2868 case SYS_POWEROFF:
2869 case SYS_USB_CONNECTED:
2870 /* Put the event back into the queue. */
2871 queue_post(&tagcache_queue, ev.id, ev.data);
2872 return true;
2873 }
2874
2875 return false;
2876}
2877
2856#ifdef HAVE_TC_RAMCACHE 2878#ifdef HAVE_TC_RAMCACHE
2857static bool allocate_tagcache(void) 2879static bool allocate_tagcache(void)
2858{ 2880{
@@ -2962,28 +2984,6 @@ static bool tagcache_dumpsave(void)
2962} 2984}
2963# endif 2985# endif
2964 2986
2965/**
2966 * Returns true if there is an event waiting in the queue
2967 * that requires the current operation to be aborted.
2968 */
2969static bool check_event_queue(void)
2970{
2971 struct event ev;
2972
2973 queue_wait_w_tmo(&tagcache_queue, &ev, 0);
2974 switch (ev.id)
2975 {
2976 case Q_STOP_SCAN:
2977 case SYS_POWEROFF:
2978 case SYS_USB_CONNECTED:
2979 /* Put the event back into the queue. */
2980 queue_post(&tagcache_queue, ev.id, ev.data);
2981 return true;
2982 }
2983
2984 return false;
2985}
2986
2987static bool load_tagcache(void) 2987static bool load_tagcache(void)
2988{ 2988{
2989 struct tagcache_header *tch; 2989 struct tagcache_header *tch;