LogIt++
Header-only, macro-first C++ logging library
Loading...
Searching...
No Matches
MdbxProcessId.hpp
Go to the documentation of this file.
1
#pragma once
2
#ifndef LOGIT_CPP_HEADER_LOGIT_CPP_LOGIT_DETAIL_MDBXPROCESSID_HPP_INCLUDED
3
#define LOGIT_CPP_HEADER_LOGIT_CPP_LOGIT_DETAIL_MDBXPROCESSID_HPP_INCLUDED
4
7
8
#include <cstdint>
9
10
#if defined(_WIN32)
11
#include <windows.h>
12
#else
13
#include <unistd.h>
14
#endif
15
16
namespace
logit
{
17
namespace
detail {
18
19
inline
uint64_t
current_process_id
() {
20
#if defined(_WIN32)
21
return
static_cast<
uint64_t
>
(GetCurrentProcessId());
22
#else
23
return
static_cast<
uint64_t
>
(getpid());
24
#endif
25
}
26
27
}
// namespace detail
28
}
// namespace logit
29
30
#endif
// LOGIT_CPP_HEADER_LOGIT_CPP_LOGIT_DETAIL_MDBXPROCESSID_HPP_INCLUDED
logit::detail::current_process_id
uint64_t current_process_id()
Definition
MdbxProcessId.hpp:19
logit
The primary namespace for the LogIt++ library.
include
logit_cpp
logit
detail
MdbxProcessId.hpp
Generated by
1.12.0