libcopp  1.2.1
Data Structures | Namespaces | Macros | Functions
coroutine_context.h File Reference
#include <cstddef>
#include <libcopp/fcontext/all.hpp>
#include <libcopp/stack/stack_context.h>
#include <libcopp/utils/atomic_int_type.h>
#include <libcopp/utils/features.h>
#include <libcopp/utils/non_copyable.h>
#include <libcopp/utils/std/functional.h>
#include <libcopp/utils/std/smart_ptr.h>
Include dependency graph for coroutine_context.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  copp::details::align_helper_inner< N, BIGGER_THAN_16 >
 
struct  copp::details::align_helper_inner< N, true >
 
struct  copp::details::align_helper_inner< N, false >
 
struct  copp::details::align_helper< N >
 
class  copp::coroutine_context
 base type of all coroutine context More...
 
struct  copp::coroutine_context::status_t
 status of safe coroutine context base More...
 
struct  copp::coroutine_context::flag_t
 
struct  copp::coroutine_context::jump_src_data_t
 

Namespaces

 copp
 
 copp::details
 
 copp::this_coroutine
 

Macros

#define COROUTINE_CONTEXT_BASE_USING_BASE_SEGMENTED_STACKS(base_type)
 
#define COROUTINE_CONTEXT_BASE_USING_BASE(base_type)
 
#define COROUTINE_CONTEXT_BASE_ALIGN_UNIT_SIZE   ::copp::details::align_helper<2 * sizeof(long double)>::value
 

Functions

 copp::details::UTIL_CONFIG_STATIC_ASSERT (COROUTINE_CONTEXT_BASE_ALIGN_UNIT_SIZE >=16 &&0==COROUTINE_CONTEXT_BASE_ALIGN_UNIT_SIZE% 16)
 
coroutine_context * copp::this_coroutine::get_coroutine () UTIL_CONFIG_NOEXCEPT
 get current coroutine More...
 
template<typename Tc >
Tc * copp::this_coroutine::get ()
 get current coroutine and try to convert type More...
 
int copp::this_coroutine::yield (void **priv_data=UTIL_CONFIG_NULLPTR)
 yield current coroutine More...
 

Macro Definition Documentation

#define COROUTINE_CONTEXT_BASE_ALIGN_UNIT_SIZE   ::copp::details::align_helper<2 * sizeof(long double)>::value
#define COROUTINE_CONTEXT_BASE_USING_BASE (   base_type)
Value:
protected: \
using base_type::caller_; \
using base_type::callee_; \
using base_type::callee_stack_; \
#define COROUTINE_CONTEXT_BASE_USING_BASE_SEGMENTED_STACKS(base_type)

Definition at line 22 of file coroutine_context.h.

#define COROUTINE_CONTEXT_BASE_USING_BASE_SEGMENTED_STACKS (   base_type)

Definition at line 19 of file coroutine_context.h.