Panda3D

reMutexSpinlockImpl.I
Go to the documentation of this file.
1 /**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file reMutexSpinlockImpl.I
10 * @author rdb
11 * @date 2018-09-03
12 */
13
14 /**
15 *
16 */
17 INLINE void ReMutexSpinlockImpl::
18 unlock() {
19 assert(_counter > 0);
20 if (!--_counter) {
21 AtomicAdjust::set_ptr(_locking_thread, nullptr);
22 }
23 }
AtomicAdjustDummyImpl::set_ptr
static Pointer set_ptr(Pointer &var, Pointer new_value)
Atomically changes the indicated variable and returns the original value.
Definition: atomicAdjustDummyImpl.I:67