Skip to content

Commit

Permalink
encapsulating mutex in uvc-device lock-guard
Browse files Browse the repository at this point in the history
  • Loading branch information
remibettan committed Feb 5, 2020
1 parent 094d619 commit 0691388
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/uvc/uvc-device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ class lock_singleton
static lock_singleton inst;
return inst;
}
void lock() { m.lock; }
void unlock(){ m.unlock; }

private:
std::recursive_mutex m;
};

Expand Down Expand Up @@ -316,12 +319,12 @@ namespace librealsense

void rs_uvc_device::lock() const
{
lock_singleton::instance().m.lock();
lock_singleton::instance().lock();
}

void rs_uvc_device::unlock() const
{
lock_singleton::instance().m.unlock();
lock_singleton::instance().unlock();
}

std::string rs_uvc_device::get_device_location() const
Expand Down

0 comments on commit 0691388

Please sign in to comment.