15 #include "asyncTaskBase.h" 17 #include "atomicAdjust.h" 47 record_task(
Thread *current_thread) {
48 nassertv(current_thread->_current_task == NULL);
51 ((
void * TVOLATILE &)current_thread->_current_task,
52 (
void *)NULL, (
void *)
this);
61 nassertv(result == NULL);
62 nassertv(current_thread->_current_task ==
this);
73 clear_task(
Thread *current_thread) {
74 nassertv(current_thread->_current_task ==
this);
77 ((
void * TVOLATILE &)current_thread->_current_task,
78 (
void *)
this, (
void *)NULL);
87 nassertv(result ==
this);
88 nassertv(current_thread->_current_task == NULL);
A thread; that is, a lightweight process.
TypeHandle is the identifier used to differentiate C++ class types.
static Pointer compare_and_exchange_ptr(Pointer &mem, Pointer old_value, Pointer new_value)
Atomic compare and exchange.