Fix windows
This commit is contained in:
parent
4b893ca726
commit
0a4e95cd30
5
.idea/codeStyles/codeStyleConfig.xml
generated
Normal file
5
.idea/codeStyles/codeStyleConfig.xml
generated
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<component name="ProjectCodeStyleConfiguration">
|
||||||
|
<state>
|
||||||
|
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
|
||||||
|
</state>
|
||||||
|
</component>
|
||||||
@ -26,16 +26,16 @@
|
|||||||
|
|
||||||
#if defined APL || defined LIN
|
#if defined APL || defined LIN
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <unistd.h>
|
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
#include <sstream>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <sstream>
|
|
||||||
|
|
||||||
namespace util
|
namespace util
|
||||||
{
|
{
|
||||||
@ -275,9 +275,7 @@ namespace util
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#pragma clang diagnostic pop
|
#pragma clang diagnostic pop
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static inline void setThreadName(const std::string &name)
|
static inline void setThreadName(const std::string &name)
|
||||||
{
|
{
|
||||||
#ifdef APL
|
#ifdef APL
|
||||||
@ -295,9 +293,6 @@ namespace util
|
|||||||
// http://man7.org/linux/man-pages/man2/prctl.2.html
|
// http://man7.org/linux/man-pages/man2/prctl.2.html
|
||||||
//
|
//
|
||||||
pthread_setname_np(pthread_self(), name.substr(0, 15).c_str());
|
pthread_setname_np(pthread_self(), name.substr(0, 15).c_str());
|
||||||
#endif
|
|
||||||
#ifdef IBM
|
|
||||||
SetThreadName(-1, name.c_str());
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user