Skip to content
Snippets Groups Projects
  1. Jan 27, 2013
  2. Jan 16, 2013
  3. Jan 02, 2013
    • Avi Kivity's avatar
      mutex: add with_lock() function · 3d435cc9
      Avi Kivity authored
      This function allows executing a block of code under a lock, with a guarantee
      that any exit from the block will release the lock.
      
      Examples:
      
          with_lock(my_mutex, [&] { a += b; });
      
          return with_lock(my_spinlock, [&] {
              return my_list.size();
          });
      3d435cc9
  4. Dec 23, 2012
Loading