Commit 7abda8b5 authored by captainwong's avatar captainwong

testing linux build 11

parent ac8eff0f
#pragma once
#include "config.h"
#include <stdint.h>
namespace jlib
{
#ifdef JLIB_WINDOWS
#include <Windows.h>
inline uint64_t getPid() {
return GetCurrentProcessId();
}
#else
#include <sys/types.h>
#include <unistd.h>
inline uint64_t getPid() {
return ::getpid();
}
#endif
}
......@@ -32,6 +32,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "base", "base", "{608A105E-4
..\jlib\base\logging.h = ..\jlib\base\logging.h
..\jlib\base\logstream.h = ..\jlib\base\logstream.h
..\jlib\base\noncopyable.h = ..\jlib\base\noncopyable.h
..\jlib\base\process.h = ..\jlib\base\process.h
..\jlib\base\singleton.h = ..\jlib\base\singleton.h
..\jlib\base\stringpiece.h = ..\jlib\base\stringpiece.h
..\jlib\base\thread.h = ..\jlib\base\thread.h
......
......@@ -3,6 +3,7 @@
#include "../../jlib/base/threadpool.h"
#include "../../jlib/base/countdownlatch.h"
#include "../../jlib/base/currentthread.h"
#include "../../jlib/base/process.h"
using namespace jlib;
using namespace std::chrono;
......@@ -45,7 +46,7 @@ void test(int maxSize) {
int main()
{
Logger::setLogLevel(Logger::LOGLEVEL_DEBUG);
LOG_INFO << _getpid();
LOG_INFO << getPid();
//test(0);
//test(1);
//test(5);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment