aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/deps/rpclib/include/rpc/detail/dev_utils.h
blob: 32532097064fad05b87276aebd58dccc67dd400d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#pragma once

#ifndef DEV_UTILS_H_JQSWE2OS
#define DEV_UTILS_H_JQSWE2OS

#ifdef RPCLIB_LINUX
#include "pthread.h"
#endif

namespace rpc {
namespace detail {
inline void name_thread(std::string const &name) {
    (void)name;
#ifdef RPCLIB_LINUX
    pthread_setname_np(pthread_self(), name.c_str());
#endif
}
} /* detail */
} /* rpc */

#endif /* end of include guard: DEV_UTILS_H_JQSWE2OS */