X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=nageru%2Fpbo_frame_allocator.cpp;fp=nageru%2Fpbo_frame_allocator.cpp;h=6211937b701f21dc2bdfbe916781f71f4629fb6b;hb=b44bf7cfce6a5aaffbcd1e37df39068a163438ad;hp=c8687025e2f2f1d5dc0d193a07035b01e272f970;hpb=add8bb3a499cfeaad58bf5bdbda68391bab64059;p=nageru diff --git a/nageru/pbo_frame_allocator.cpp b/nageru/pbo_frame_allocator.cpp index c868702..6211937 100644 --- a/nageru/pbo_frame_allocator.cpp +++ b/nageru/pbo_frame_allocator.cpp @@ -261,7 +261,7 @@ bmusb::FrameAllocator::Frame PBOFrameAllocator::alloc_frame() { Frame vf; - unique_lock lock(freelist_mutex); // Meh. + lock_guard lock(freelist_mutex); // Meh. if (freelist.empty()) { printf("Frame overrun (no more spare PBO frames), dropping frame!\n"); } else { @@ -309,7 +309,7 @@ void PBOFrameAllocator::release_frame(Frame frame) } #endif - unique_lock lock(freelist_mutex); + lock_guard lock(freelist_mutex); freelist.push(frame); //--sumsum; }