summaryrefslogtreecommitdiff
path: root/coroutine
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-01-22 23:21:25 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-01-22 23:21:25 +0900
commitf1c36f2e6b0cd24dbcc9faf81a2ab88040eded2c (patch)
treee22aa16400373626cc0fce823657e1d00715bf80 /coroutine
parentc3244a3574da8ddc35523ef1b882dd2aadfc2818 (diff)
Added include guards to coroutine headers
Diffstat (limited to 'coroutine')
-rw-r--r--coroutine/Stack.h5
-rw-r--r--coroutine/amd64/Context.h5
-rw-r--r--coroutine/arm32/Context.h5
-rw-r--r--coroutine/arm64/Context.h5
-rw-r--r--coroutine/copy/Context.h5
-rw-r--r--coroutine/ppc64le/Context.h5
-rw-r--r--coroutine/ucontext/Context.h5
-rw-r--r--coroutine/win32/Context.h5
-rw-r--r--coroutine/win64/Context.h5
-rw-r--r--coroutine/x86/Context.h5
10 files changed, 50 insertions, 0 deletions
diff --git a/coroutine/Stack.h b/coroutine/Stack.h
index f0fc703622..b3f57dcaaa 100644
--- a/coroutine/Stack.h
+++ b/coroutine/Stack.h
@@ -1,3 +1,6 @@
+#ifndef COROUTINE_STACK_H
+#define COROUTINE_STACK_H 1
+
/*
* This file is part of the "Coroutine" project and released under the MIT License.
*
@@ -14,3 +17,5 @@
#define COROUTINE_STACK_LOCAL(type, name) type name##_local; type * name = &name##_local
#define COROUTINE_STACK_FREE(name)
#endif
+
+#endif /* COROUTINE_STACK_H */
diff --git a/coroutine/amd64/Context.h b/coroutine/amd64/Context.h
index 581525b67e..676975f57d 100644
--- a/coroutine/amd64/Context.h
+++ b/coroutine/amd64/Context.h
@@ -1,3 +1,6 @@
+#ifndef COROUTINE_AMD64_CONTEXT_H
+#define COROUTINE_AMD64_CONTEXT_H 1
+
/*
* This file is part of the "Coroutine" project and released under the MIT License.
*
@@ -52,3 +55,5 @@ static inline void coroutine_destroy(struct coroutine_context * context)
{
context->stack_pointer = NULL;
}
+
+#endif /* COROUTINE_AMD64_CONTEXT_H */
diff --git a/coroutine/arm32/Context.h b/coroutine/arm32/Context.h
index e69f4b2eeb..a1c5e03b36 100644
--- a/coroutine/arm32/Context.h
+++ b/coroutine/arm32/Context.h
@@ -1,3 +1,6 @@
+#ifndef COROUTINE_ARM32_CONTEXT_H
+#define COROUTINE_ARM32_CONTEXT_H 1
+
/*
* This file is part of the "Coroutine" project and released under the MIT License.
*
@@ -51,3 +54,5 @@ struct coroutine_context * coroutine_transfer(struct coroutine_context * current
static inline void coroutine_destroy(struct coroutine_context * context)
{
}
+
+#endif /* COROUTINE_ARM32_CONTEXT_H */
diff --git a/coroutine/arm64/Context.h b/coroutine/arm64/Context.h
index 34be995a4f..0ba7354965 100644
--- a/coroutine/arm64/Context.h
+++ b/coroutine/arm64/Context.h
@@ -1,3 +1,6 @@
+#ifndef COROUTINE_ARM64_CONTEXT_H
+#define COROUTINE_ARM64_CONTEXT_H 1
+
/*
* This file is part of the "Coroutine" project and released under the MIT License.
*
@@ -50,3 +53,5 @@ struct coroutine_context * coroutine_transfer(struct coroutine_context * current
static inline void coroutine_destroy(struct coroutine_context * context)
{
}
+
+#endif /* COROUTINE_ARM64_CONTEXT_H */
diff --git a/coroutine/copy/Context.h b/coroutine/copy/Context.h
index 6038f00cf6..db13604d3f 100644
--- a/coroutine/copy/Context.h
+++ b/coroutine/copy/Context.h
@@ -1,3 +1,6 @@
+#ifndef COROUTINE_COPY_CONTEXT_H
+#define COROUTINE_COPY_CONTEXT_H 1
+
/*
* This file is part of the "Coroutine" project and released under the MIT License.
*
@@ -88,3 +91,5 @@ static inline void coroutine_destroy(struct coroutine_context *context)
context->size = 0;
context->from = NULL;
}
+
+#endif /* COROUTINE_COPY_CONTEXT_H */
diff --git a/coroutine/ppc64le/Context.h b/coroutine/ppc64le/Context.h
index e36f9c3583..7a7d9fe8c9 100644
--- a/coroutine/ppc64le/Context.h
+++ b/coroutine/ppc64le/Context.h
@@ -1,3 +1,6 @@
+#ifndef COROUTINE_PPC64LE_CONTEXT_H
+#define COROUTINE_PPC64LE_CONTEXT_H 1
+
#pragma once
#include <assert.h>
@@ -49,3 +52,5 @@ static inline void coroutine_destroy(struct coroutine_context * context)
{
context->stack_pointer = NULL;
}
+
+#endif /* COROUTINE_PPC64LE_CONTEXT_H */
diff --git a/coroutine/ucontext/Context.h b/coroutine/ucontext/Context.h
index 2b2a593793..797108642b 100644
--- a/coroutine/ucontext/Context.h
+++ b/coroutine/ucontext/Context.h
@@ -1,3 +1,6 @@
+#ifndef COROUTINE_UCONTEXT_CONTEXT_H
+#define COROUTINE_UCONTEXT_CONTEXT_H 1
+
/*
* This file is part of the "Coroutine" project and released under the MIT License.
*
@@ -68,3 +71,5 @@ static inline void coroutine_destroy(struct coroutine_context * context)
context->state.uc_stack.ss_size = 0;
context->from = NULL;
}
+
+#endif /* COROUTINE_UCONTEXT_CONTEXT_H */
diff --git a/coroutine/win32/Context.h b/coroutine/win32/Context.h
index e20342a98d..dd12da6de8 100644
--- a/coroutine/win32/Context.h
+++ b/coroutine/win32/Context.h
@@ -1,3 +1,6 @@
+#ifndef COROUTINE_WIN32_CONTEXT_H
+#define COROUTINE_WIN32_CONTEXT_H 1
+
/*
* This file is part of the "Coroutine" project and released under the MIT License.
*
@@ -57,3 +60,5 @@ struct coroutine_context * __fastcall coroutine_transfer(struct coroutine_contex
static inline void coroutine_destroy(struct coroutine_context * context)
{
}
+
+#endif /* COROUTINE_WIN32_CONTEXT_H */
diff --git a/coroutine/win64/Context.h b/coroutine/win64/Context.h
index e28e6a6ff0..d5834cfb36 100644
--- a/coroutine/win64/Context.h
+++ b/coroutine/win64/Context.h
@@ -1,3 +1,6 @@
+#ifndef COROUTINE_WIN64_CONTEXT_H
+#define COROUTINE_WIN64_CONTEXT_H 1
+
/*
* This file is part of the "Coroutine" project and released under the MIT License.
*
@@ -67,3 +70,5 @@ struct coroutine_context * coroutine_transfer(struct coroutine_context * current
static inline void coroutine_destroy(struct coroutine_context * context)
{
}
+
+#endif /* COROUTINE_WIN64_CONTEXT_H */
diff --git a/coroutine/x86/Context.h b/coroutine/x86/Context.h
index dfdde24f5d..1d709fa98d 100644
--- a/coroutine/x86/Context.h
+++ b/coroutine/x86/Context.h
@@ -1,3 +1,6 @@
+#ifndef COROUTINE_X86_CONTEXT_H
+#define COROUTINE_X86_CONTEXT_H 1
+
/*
* This file is part of the "Coroutine" project and released under the MIT License.
*
@@ -53,3 +56,5 @@ static inline void coroutine_destroy(struct coroutine_context * context)
{
context->stack_pointer = NULL;
}
+
+#endif /* COROUTINE_X86_CONTEXT_H */