MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/PhysX / setName

Method setName

physx/source/foundation/src/unix/PsUnixThread.cpp:330–350  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

328}
329
330void ThreadImpl::setName(const char* name)
331{
332 getThread(this)->name = name;
333
334 if (getThread(this)->state == _PxThreadStarted)
335 {
336#if(defined(ANDROID) && (__ANDROID_API__ > 8))
337 pthread_setname_np(getThread(this)->thread, name);
338#elif PX_PS4
339 setNamePS4(getThread(this)->thread, name);
340#else
341 // not implemented because most unix APIs expect setName()
342 // to be called from the thread's context. Example see next comment:
343
344 // this works only with the current thread and can rename
345 // the main process if used in the wrong context:
346 // prctl(PR_SET_NAME, reinterpret_cast<unsigned long>(name) ,0,0,0);
347 PX_UNUSED(name);
348#endif
349 }
350}
351
352#if !PX_APPLE_FAMILY
353static ThreadPriority::Enum convertPriorityFromLinux(uint32_t inPrio, int policy)

Callers

nothing calls this directly

Calls 2

PX_UNUSEDFunction · 0.85
getThreadFunction · 0.70

Tested by

no test coverage detected