tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

lock_impl_win.cc (495B)


      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 
     12 LockImpl::LockImpl() : native_handle_(SRWLOCK_INIT) {}
     13 
     14 LockImpl::~LockImpl() = default;
     15 
     16 void LockImpl::LockInternal() {
     17  ::AcquireSRWLockExclusive(reinterpret_cast<PSRWLOCK>(&native_handle_));
     18 }
     19 
     20 }  // namespace internal
     21 }  // namespace base