Skip to content

Commit

Permalink
Small Fix to Mutex Init (#6846)
Browse files Browse the repository at this point in the history
  • Loading branch information
cwfitzgerald authored Jan 3, 2025
1 parent 15a77b5 commit 111a6a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wgpu-hal/src/auxil/dxgi/exception.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::{borrow::Cow, slice};

use parking_lot::{lock_api::RawMutex, Mutex};
use parking_lot::Mutex;
use windows::Win32::{Foundation, System::Diagnostics::Debug};

// This is a mutex as opposed to an atomic as we need to completely
Expand All @@ -9,7 +9,7 @@ use windows::Win32::{Foundation, System::Diagnostics::Debug};
//
// By routing all the registration through these functions we can guarantee
// there is either 1 or 0 exception handlers registered, not multiple.
static EXCEPTION_HANDLER_COUNT: Mutex<usize> = Mutex::const_new(parking_lot::RawMutex::INIT, 0);
static EXCEPTION_HANDLER_COUNT: Mutex<usize> = Mutex::new(0);

pub fn register_exception_handler() {
let mut count_guard = EXCEPTION_HANDLER_COUNT.lock();
Expand Down

0 comments on commit 111a6a8

Please sign in to comment.