Added include guards to coroutine headers

This commit is contained in:
Nobuyoshi Nakada 2021-01-22 23:21:25 +09:00
Родитель c3244a3574
Коммит f1c36f2e6b
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 7CD2805BFA3770C6
10 изменённых файлов: 50 добавлений и 0 удалений

Просмотреть файл

@ -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 */

Просмотреть файл

@ -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 */

Просмотреть файл

@ -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 */

Просмотреть файл

@ -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 */

Просмотреть файл

@ -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 */

Просмотреть файл

@ -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 */

Просмотреть файл

@ -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 */

Просмотреть файл

@ -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 */

Просмотреть файл

@ -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 */

Просмотреть файл

@ -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 */