pstore2
thread.hpp
Go to the documentation of this file.
1 //===- include/pstore/os/thread.hpp -----------------------*- mode: C++ -*-===//
2 //* _ _ _ *
3 //* | |_| |__ _ __ ___ __ _ __| | *
4 //* | __| '_ \| '__/ _ \/ _` |/ _` | *
5 //* | |_| | | | | | __/ (_| | (_| | *
6 //* \__|_| |_|_| \___|\__,_|\__,_| *
7 //* *
8 //===----------------------------------------------------------------------===//
9 //
10 // Part of the pstore project, under the Apache License v2.0 with LLVM Exceptions.
11 // See https://github.com/SNSystems/pstore/blob/master/LICENSE.txt for license
12 // information.
13 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
14 //
15 //===----------------------------------------------------------------------===//
17 
18 #ifndef PSTORE_OS_THREAD_HPP
19 #define PSTORE_OS_THREAD_HPP
20 
21 #include <cstdint>
22 #include <cstdlib>
23 #include <string>
24 
25 #ifdef _WIN32
26 # define NOMINMAX
27 # define WIN32_LEAN_AND_MEAN
28 # include <Windows.h>
29 #endif // _WIN32
30 
31 #include "pstore/support/gsl.hpp"
32 
33 namespace pstore {
34  namespace threads {
35 
36  constexpr std::size_t name_size = 16;
37  void set_name (gsl::not_null<gsl::czstring> name);
38  gsl::czstring get_name (gsl::span<char, name_size> name /*out*/);
39  std::string get_name ();
40 
41  } // end namespace threads
42 } // end namespace pstore
43 
44 #endif // PSTORE_OS_THREAD_HPP
Definition: nonpod2.cpp:40