Change from custom Lock to std::mutex.
[ Merge of http://go/wvgerrit/67884 ] Now that we can use C++11, we should use the cross-platform std::mutex type, not the custom pthread version. Bug: 111850982 Test: WV unit/integration tests Change-Id: If2fde2836826c5184609e6b1f3a6511206bd4594
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#define WVCDM_CORE_CDM_ENGINE_H_
|
||||
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -16,7 +17,6 @@
|
||||
#include "disallow_copy_and_assign.h"
|
||||
#include "file_store.h"
|
||||
#include "initialization_data.h"
|
||||
#include "lock.h"
|
||||
#include "metrics_collections.h"
|
||||
#include "oemcrypto_adapter.h"
|
||||
#include "service_certificate.h"
|
||||
@@ -338,7 +338,7 @@ class CdmEngine {
|
||||
int64_t last_usage_information_update_time_;
|
||||
|
||||
// Protect release_key_sets_ from non-thread-safe operations.
|
||||
Lock release_key_sets_lock_;
|
||||
std::mutex release_key_sets_lock_;
|
||||
|
||||
// TODO(rfrias): Replace with two sets of locks, one to protect
|
||||
// the CdmSessionMap and a per-session lock to control access to
|
||||
@@ -349,7 +349,7 @@ class CdmEngine {
|
||||
// The layer above the CDM implementation is expected to handle thread
|
||||
// synchronization to make sure other functions that access sessions do not
|
||||
// occur simultaneously with OpenSession or CloseSession.
|
||||
Lock session_map_lock_;
|
||||
std::mutex session_map_lock_;
|
||||
|
||||
CORE_DISALLOW_COPY_AND_ASSIGN(CdmEngine);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user