Skip to content
Snippets Groups Projects

[Runtime] Prefix EMPER workers names with EMPER

Merged Florian Schmaus requested to merge flow/emper:emper-thread into master
1 file
+ 4
1
Compare changes
  • Side-by-side
  • Inline
+ 4
1
@@ -238,7 +238,10 @@ Runtime::Runtime(workerid_t workerCount, const std::vector<NewWorkerHook>& newWo
errno = pthread_create(&threads[i], &attr, thread_function, worker);
if (errno) DIE_MSG_ERRNO("pthread_create() failed");
std::string thread_name = "Worker #" + std::to_string(i);
// Note that Linux limits the length of the thread name to 16
// bytes, incl. the terminating null byte. Hence we have to use a
// hip name.
std::string thread_name = "EMPER Wrkr #" + std::to_string(i);
errno = pthread_setname_np(threads[i], thread_name.c_str());
if (errno) DIE_MSG_ERRNO("pthread_setname_np() failed");
}
Loading