1 // Copyright 2011 The Chromium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #include "base/synchronization/lock_impl.h" 6 7 #include <windows.h> 8 9 namespace base { 10 namespace internal { 11 LockImpl()12LockImpl::LockImpl() : native_handle_(SRWLOCK_INIT) {} 13 14 LockImpl::~LockImpl() = default; 15 LockInternal()16void LockImpl::LockInternal() { 17 ::AcquireSRWLockExclusive(reinterpret_cast<PSRWLOCK>(&native_handle_)); 18 } 19 20 } // namespace internal 21 } // namespace base 22