| 176 | //=================================================================================================== |
| 177 | |
| 178 | static 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 |
| 204 | static std::string build_rtpecho_filename(const char* mediaName) |
no outgoing calls
no test coverage detected