PThreads.cpp 397 Bytes
Newer Older
1
2
3
4
#include <log4shib/threading/Threading.hh>

#if defined(LOG4SHIB_HAVE_THREADING) && defined(LOG4SHIB_USE_PTHREADS)

Russ Allbery's avatar
Russ Allbery committed
5
6
#include <sstream>

7
8
9
10
namespace log4shib {
    namespace threading {

        std::string getThreadId() {
Russ Allbery's avatar
Russ Allbery committed
11
12
13
            std::ostringstream os;
            os << pthread_self();
            return os.str();
14
15
16
17
18
19
        }

    }
}

#endif // LOG4SHIB_HAVE_THREADING && LOG4SHIB_USE_PTHREADS