Menu

[2d617b]: / src / OmniThreads.cpp  Maximize  Restore  History

Download this file

23 lines (17 with data), 545 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*
* Copyright 2002, Log4cpp Project. All rights reserved.
*
* See the COPYING file for the terms of usage and distribution.
*/
#include <log4cpp/threading/Threading.hh>
#if defined(LOG4CPP_HAVE_THREADING) && defined(LOG4CPP_USE_OMNITHREADS)
namespace log4cpp {
namespace threading {
std::string getThreadId() {
char buffer[16];
sprintf(buffer, "%d", ::omni_thread::self()->id());
return std::string(buffer);
};
}
}
#endif // LOG4CPP_HAVE_THREADING && LOG4CPP_USE_ONMITHREADS
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.