Dropping smartstreams (not fully cleared) and added get_pid()
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#ifdef _TARGET_WINDOWS
|
||||
#include <Windows.h>
|
||||
#endif // _TARGET_WINDOWS
|
||||
|
||||
#ifdef _TARGET_LINUX
|
||||
#include <unistd.h>
|
||||
#endif // _TARGET_LINUX
|
||||
|
||||
#include "Processes.hpp"
|
||||
|
||||
namespace nb {
|
||||
|
||||
#ifdef _TARGET_WINDOWS
|
||||
uint64_t get_pid() {
|
||||
const auto pid_w = GetCurrentProcessId();
|
||||
uint64_t ret;
|
||||
memcpy(&ret, &pid_w, sizeof(pid_w));
|
||||
return ret;
|
||||
}
|
||||
#endif // _TARGET_WINDOWS
|
||||
|
||||
#ifdef _TARGET_LINUX
|
||||
#endif // _TARGET_LINUX
|
||||
|
||||
} // namespace nb
|
||||
Reference in New Issue
Block a user