forked from orocos-toolchain/log4cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMSThreads.cpp
More file actions
27 lines (22 loc) · 692 Bytes
/
Copy pathMSThreads.cpp
File metadata and controls
27 lines (22 loc) · 692 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/*
* Copyright 2002, Log4cpp Project. All rights reserved.
*
* See the COPYING file for the terms of usage and distribution.
*/
#include <log4cpp/threading/Threading.hh>
#include <stdio.h>
#if defined(LOG4CPP_HAVE_THREADING) && defined(LOG4CPP_USE_MSTHREADS)
namespace log4cpp {
namespace threading {
std::string getThreadId() {
char buffer[16];
sprintf(buffer, "%lu", GetCurrentThreadId());
return std::string(buffer);
};
char* getThreadId(char* buffer) {
sprintf(buffer, "%lu", GetCurrentThreadId());
return buffer;
};
}
}
#endif // LOG4CPP_HAVE_THREADING && LOG4CPP_USE_MSTHREADS