MCPcopy Create free account
hub / github.com/SIPp/sipp / getThreadId

Function getThreadId

src/rtpstream.cpp:178–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176//===================================================================================================
177
178static unsigned long long getThreadId(pthread_t p)
179{
180 unsigned long long retVal = -1;
181
182#if defined(__APPLE__)
183 int rc = -1;
184 uint64_t thread_id = 0;
185 rc = pthread_threadid_np(p, &thread_id);
186 if (rc == 0)
187 {
188 retVal = thread_id;
189 }
190 else
191 {
192 retVal = -1;
193 }
194#elif defined(__CYGWIN__)
195 retVal = -1; // CygWin uses dummy thread IDs in pthread_t
196#else // !__APPLE__ && !__CYGWIN__
197 retVal = (unsigned long long)p;
198#endif // __APPLE__
199
200 return retVal;
201}
202
203#ifdef USE_TLS
204static std::string build_rtpecho_filename(const char* mediaName)

Callers 2

rtpstream_start_taskFunction · 0.85
rtpstream_shutdownFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected