-
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(); });
Avi Kivity authoredThis 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(); });
mutex.hh 298 B