MCPcopy Create free account
hub / github.com/Barracuda09/SATPI / getThisThreadName

Method getThisThreadName

src/base/Thread.h:69–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67 public:
68
69 static std::string getThisThreadName() {
70 char name[32];
71#ifdef HAS_NP_FUNCTIONS
72 pthread_t thread = pthread_self();
73 pthread_getname_np(thread, name, sizeof(name));
74#else
75 prctl(PR_GET_NAME, name, 0, 0, 0);
76#endif
77 return name;
78 }
79
80 // =====================================================================
81 // -- Other member functions -------------------------------------------

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected