aboutsummaryrefslogtreecommitdiff
path: root/std-threading.mxx
blob: ab397cc81030e4f89fb9db1dc8bb7bc32e250752 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
// file      : std-threading.mxx -*- C++ -*-
// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
// license   : MIT; see accompanying LICENSE file

export module std.threading; // Dummy.

#if 0
// Pre-includes.
//
#include "std-detect.hxx"

#if   defined(_MSC_VER)
#error TODO
#elif defined(__GLIBCXX__)

// <mutex>
#  define _GLIBCXX_TUPLE
#  define _GLIBCXX_CHRONO
#  define __EXCEPTION__            // <exception>
#  define _GLIBCXX_TYPE_TRAITS
#  define _GLIBCXX_SYSTEM_ERROR
#  define _GLIBCXX_STD_FUNCTION_H  // <bits/std_function.h>
#  define _FUNCTEXCEPT_H
#  define _MOVE_H

// <shared_mutex>
#  include <cerrno> // Missing include.

// <condition_variable>
#  define _CONCURRENCE_H    // <ext/concurrence.h>
#  define _ALLOC_TRAITS_H   // <bits/alloc_traits.h>
#  define _ALLOCATOR_H      // <bits/allocator.h>
#  define _UNIQUE_PTR_H     // <bits/unique_ptr.h>
#  define _SHARED_PTR_H     // <bits/shared_ptr.h>
#  define _CXXABI_FORCED_H  // <bits/cxxabi_forced.h>
#  include <bits/exception_defines.h> // Missing include.

// <thread>
#  define _GLIBCXX_MEMORY
#  define _FUNCTIONAL_HASH_H  // <bits/functional_hash.h>
#  define _GLIBCXX_INVOKE_H   // <bits/invoke.h>

#  include <bits/gthr.h>
#elif defined(_LIBCPP_VERSION)
#endif

export module std.threading;

#ifdef __GLIBCXX__
import std.core;
#endif

export
{
#include <mutex>
#include <shared_mutex>
#include <condition_variable>
#include <thread>
}
#endif