0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-26 22:08:20 +02:00

ircd::ctx::this_ctx: Fix inline namespace reopening for clang.

This commit is contained in:
Jason Volk 2019-06-23 00:08:46 -06:00
parent 801f0d57b7
commit ab32ef76d7
8 changed files with 22 additions and 15 deletions

View file

@ -11,10 +11,11 @@
#pragma once #pragma once
#define HAVE_IRCD_CTX_CRITICAL_ASSERTION_H #define HAVE_IRCD_CTX_CRITICAL_ASSERTION_H
namespace ircd::ctx::this_ctx namespace ircd::ctx {
inline namespace this_ctx
{ {
struct critical_assertion; // Assert no yielding for a section struct critical_assertion; // Assert no yielding for a section
} }}
/// An instance of critical_assertion detects an attempt to context switch. /// An instance of critical_assertion detects an attempt to context switch.
/// ///

View file

@ -11,10 +11,11 @@
#pragma once #pragma once
#define HAVE_IRCD_CTX_CRITICAL_INDICATOR_H #define HAVE_IRCD_CTX_CRITICAL_INDICATOR_H
namespace ircd::ctx::this_ctx namespace ircd::ctx {
inline namespace this_ctx
{ {
struct critical_indicator; // Indicates if yielding happened for a section struct critical_indicator; // Indicates if yielding happened for a section
} }}
/// An instance of critical_indicator reports if context switching happened. /// An instance of critical_indicator reports if context switching happened.
/// ///

View file

@ -11,10 +11,11 @@
#pragma once #pragma once
#define HAVE_IRCD_CTX_EXCEPTION_HANDLER_H #define HAVE_IRCD_CTX_EXCEPTION_HANDLER_H
namespace ircd::ctx::this_ctx namespace ircd::ctx {
inline namespace this_ctx
{ {
struct exception_handler; struct exception_handler;
} }}
/// An instance of exception_handler must be present to allow a context /// An instance of exception_handler must be present to allow a context
/// switch inside a catch block. This is due to ABI limitations that stack /// switch inside a catch block. This is due to ABI limitations that stack

View file

@ -11,10 +11,11 @@
#pragma once #pragma once
#define HAVE_IRCD_CTX_SLICE_USAGE_WARNING_H #define HAVE_IRCD_CTX_SLICE_USAGE_WARNING_H
namespace ircd::ctx::this_ctx namespace ircd::ctx {
inline namespace this_ctx
{ {
struct slice_usage_warning; struct slice_usage_warning;
} }}
#ifndef NDEBUG #ifndef NDEBUG
struct ircd::ctx::this_ctx::slice_usage_warning struct ircd::ctx::this_ctx::slice_usage_warning

View file

@ -11,12 +11,13 @@
#pragma once #pragma once
#define HAVE_IRCD_CTX_STACK_USAGE_ASSERTION_H #define HAVE_IRCD_CTX_STACK_USAGE_ASSERTION_H
namespace ircd::ctx::this_ctx namespace ircd::ctx {
inline namespace this_ctx
{ {
struct stack_usage_assertion; struct stack_usage_assertion;
size_t stack_at_here() __attribute__((noinline)); size_t stack_at_here() __attribute__((noinline));
} }}
/// An instance of stack_usage_assertion is placed on a ctx stack where one /// An instance of stack_usage_assertion is placed on a ctx stack where one
/// wants to test the stack usage at both construction and destruction points /// wants to test the stack usage at both construction and destruction points

View file

@ -11,10 +11,11 @@
#pragma once #pragma once
#define HAVE_IRCD_CTX_SYSCALL_USAGE_WARNING_H #define HAVE_IRCD_CTX_SYSCALL_USAGE_WARNING_H
namespace ircd::ctx::this_ctx namespace ircd::ctx {
inline namespace this_ctx
{ {
struct syscall_usage_warning; struct syscall_usage_warning;
} }}
#ifndef NDEBUG #ifndef NDEBUG
struct ircd::ctx::this_ctx::syscall_usage_warning struct ircd::ctx::this_ctx::syscall_usage_warning

View file

@ -11,8 +11,8 @@
#pragma once #pragma once
#define HAVE_IRCD_CTX_THIS_CTX_H #define HAVE_IRCD_CTX_THIS_CTX_H
namespace ircd::ctx {
/// Interface to the currently running context /// Interface to the currently running context
namespace ircd::ctx {
inline namespace this_ctx inline namespace this_ctx
{ {
struct ctx &cur(); ///< Assumptional reference to *current struct ctx &cur(); ///< Assumptional reference to *current

View file

@ -11,14 +11,15 @@
#pragma once #pragma once
#define HAVE_IRCD_CTX_UNINTERRUPTIBLE_H #define HAVE_IRCD_CTX_UNINTERRUPTIBLE_H
namespace ircd::ctx::this_ctx namespace ircd::ctx {
inline namespace this_ctx
{ {
struct uninterruptible; struct uninterruptible;
bool interruptible() noexcept; bool interruptible() noexcept;
void interruptible(const bool &); void interruptible(const bool &);
void interruptible(const bool &, std::nothrow_t) noexcept; void interruptible(const bool &, std::nothrow_t) noexcept;
} }}
/// An instance of uninterruptible will suppress interrupts sent to the /// An instance of uninterruptible will suppress interrupts sent to the
/// context for the scope. Suppression does not discard any interrupt, /// context for the scope. Suppression does not discard any interrupt,