Advertising
- Stuff
- Friday, February 8th, 2008 at 1:13:56am MST
- Index: apps/tagcache.c
- ===================================================================
- --- apps/tagcache.c (revision 16244)
- +++ apps/tagcache.c (working copy)
- @@ -3030,21 +3030,11 @@
- return (next == command_queue_ridx);
- }
- -
- -void run_command_queue(bool force)
- +bool command_queue_sync_callback(void)
- {
- +
- struct master_header myhdr;
- int masterfd;
- -
- - if (COMMAND_QUEUE_IS_EMPTY)
- - return;
- -
- - if (!force && !command_queue_is_full()
- - && current_tick - TAGCACHE_COMMAND_QUEUE_COMMIT_DELAY
- - < command_queue_timestamp)
- - {
- - return;
- - }
- mutex_lock(&command_queue_mutex);
- @@ -3064,7 +3054,7 @@
- /* Re-open the masterfd. */
- if ( (masterfd = open_master_fd(&myhdr, true)) < 0)
- - return;
- + return true;
- break;
- }
- @@ -3082,8 +3072,30 @@
- close(masterfd);
- mutex_unlock(&command_queue_mutex);
- + return true;
- }
- +void run_command_queue(bool force)
- +{
- + if (COMMAND_QUEUE_IS_EMPTY)
- + return;
- +
- + if (!force && !command_queue_is_full()
- + && current_tick - TAGCACHE_COMMAND_QUEUE_COMMIT_DELAY
- + < command_queue_timestamp)
- + {
- + return;
- + }
- + else if (force &&
- + (command_queue_ridx != command_queue_widx))
- + {
- + command_queue_sync_callback();
- + return;
- + }
- + if (command_queue_ridx != command_queue_widx)
- + ata_idle_notify(command_queue_sync_callback);
- +}
- +
- static void queue_command(int cmd, long idx_id, int tag, long data)
- {
- while (1)
advertising
Update the Post
Either update this post and resubmit it with changes, or make a new post.
You may also comment on this post.
Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.