|
|
typedef size_t | Id |
| |
|
typedef void *(* | ExecuteFn) (void *) |
| |
◆ PxThreadImpl() [1/2]
| physx::PxThreadImpl::PxThreadImpl |
( |
| ) |
|
Construct (but do not start) the thread object. The OS thread object will not be created until start() is called. Executes in the context of the spawning thread.
◆ PxThreadImpl() [2/2]
| physx::PxThreadImpl::PxThreadImpl |
( |
PxThreadImpl::ExecuteFn |
fn, |
|
|
void * |
arg, |
|
|
const char * |
name |
|
) |
| |
Construct and start the the thread, passing the given arg to the given fn. (pthread style)
◆ ~PxThreadImpl()
| physx::PxThreadImpl::~PxThreadImpl |
( |
| ) |
|
Deallocate all resources associated with the thread. Should be called in the context of the spawning thread.
◆ getNbPhysicalCores()
| uint32_t physx::PxThreadImpl::getNbPhysicalCores |
( |
| ) |
|
|
static |
Return the number of physical cores (does not include hyper-threaded cores), returns 0 on failure
◆ getSize()
| uint32_t physx::PxThreadImpl::getSize |
( |
| ) |
|
|
static |
◆ kill()
| void physx::PxThreadImpl::kill |
( |
| ) |
|
Violently kill the current thread. Blunt instrument, not recommended since it can leave all kinds of things unreleased (stack, memory, mutexes...) Should be called in the context of the spawning thread.
◆ quit()
| void physx::PxThreadImpl::quit |
( |
| ) |
|
Cleanly shut down this thread. Called in the context of the spawned thread.
◆ quitIsSignalled()
| bool physx::PxThreadImpl::quitIsSignalled |
( |
| ) |
|
check whether the thread is signalled to quit. Called in the context of the spawned thread.
◆ setAffinityMask()
| uint32_t physx::PxThreadImpl::setAffinityMask |
( |
PxU32 |
mask | ) |
|
Change the affinity mask for this thread. The mask is a platform specific value.
On Windows, Linux, and Switch platforms, each set mask bit represents the index of a logical processor that the OS may schedule thread execution on. Bits outside the range of valid logical processors may be ignored or cause the function to return an error.
On Apple platforms, this function has no effect.
If the thread has not yet been started then the mask is stored and applied when the thread is started.
If the thread has already been started then this method returns the previous affinity mask on success, otherwise it returns zero.
◆ setName()
| void physx::PxThreadImpl::setName |
( |
const char * |
name | ) |
|
◆ setPriority()
◆ signalQuit()
| void physx::PxThreadImpl::signalQuit |
( |
| ) |
|
Stop the thread. Signals the spawned thread that it should stop, so the thread should check regularly
◆ sleep()
| void physx::PxThreadImpl::sleep |
( |
PxU32 |
ms | ) |
|
|
static |
Put the current thread to sleep for the given number of milliseconds
◆ start()
| void physx::PxThreadImpl::start |
( |
PxU32 |
stackSize, |
|
|
PxRunnable * |
r |
|
) |
| |
Create the OS thread and start it running. Called in the context of the spawning thread. If an affinity mask has previously been set then it will be applied after the thread has been created.
◆ waitForQuit()
| bool physx::PxThreadImpl::waitForQuit |
( |
| ) |
|
Wait for a thread to stop. Should be called in the context of the spawning thread. Returns false if the thread has not been started.
◆ yield()
| void physx::PxThreadImpl::yield |
( |
| ) |
|
|
static |
Yield the current thread's slot on the CPU
◆ yieldProcessor()
| void physx::PxThreadImpl::yieldProcessor |
( |
| ) |
|
|
static |
Inform the processor that we're in a busy wait to give it a chance to do something clever. yield() yields the thread, while yieldProcessor() aims to yield the processor
The documentation for this class was generated from the following files:
- RavEngine/deps/physx/physx/include/foundation/PxThread.h
- RavEngine/deps/physx/physx/source/foundation/unix/FdUnixThread.cpp
- RavEngine/deps/physx/physx/source/foundation/windows/FdWindowsThread.cpp