Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate
Sign In | Create Account

Untitled
Friday, February 8th, 2008 at 7:52:10am UTC 

  1. Index: apps/tagcache.c
  2. ===================================================================
  3. --- apps/tagcache.c     (revision 16244)
  4. +++ apps/tagcache.c     (working copy)
  5. @@ -3030,21 +3030,11 @@
  6.      
  7.      return (next == command_queue_ridx);
  8.  }
  9. -
  10. -void run_command_queue(bool force)
  11. +bool command_queue_sync_callback(void)
  12.  {
  13. +   
  14.      struct master_header myhdr;
  15.      int masterfd;
  16. -   
  17. -    if (COMMAND_QUEUE_IS_EMPTY)
  18. -        return;
  19. -   
  20. -    if (!force && !command_queue_is_full()
  21. -        && current_tick - TAGCACHE_COMMAND_QUEUE_COMMIT_DELAY
  22. -           < command_queue_timestamp)
  23. -    {
  24. -        return;
  25. -    }
  26.          
  27.      mutex_lock(&command_queue_mutex);
  28.         
  29. @@ -3064,7 +3054,7 @@
  30.                  
  31.                  /* Re-open the masterfd. */
  32.                  if ( (masterfd = open_master_fd(&myhdr, true)) < 0)
  33. -                    return;
  34. +                    return true;
  35.                  
  36.                  break;
  37.              }
  38. @@ -3082,8 +3072,28 @@
  39.      close(masterfd);
  40.      
  41.      mutex_unlock(&command_queue_mutex);
  42. +    return true;
  43.  }
  44.  
  45. +void run_command_queue(bool force)
  46. +{
  47. +    if (COMMAND_QUEUE_IS_EMPTY)
  48. +        return;
  49. +   
  50. +    if (!force && !command_queue_is_full()
  51. +         && current_tick - TAGCACHE_COMMAND_QUEUE_COMMIT_DELAY
  52. +         < command_queue_timestamp)
  53. +    {
  54. +        return;
  55. +    }
  56. +    else if (force)
  57. +    {
  58. +        command_queue_sync_callback();
  59. +        return;
  60. +    }
  61. +    ata_callback_register(command_queue_sync_callback);
  62. +}
  63. +
  64.  static void queue_command(int cmd, long idx_id, int tag, long data)
  65.  {
  66.      while (1)

Update the Post

Either update this post and resubmit it with changes, or make a new post.

You may also comment on this post.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)



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.

comments powered by Disqus
worth-right
worth-right