Motr  M0
coroutine.h File Reference
#include "lib/types.h"
#include "lib/errno.h"
#include "sm/sm.h"
Include dependency graph for coroutine.h:

Go to the source code of this file.

Data Structures

struct  m0_co_la_item
 
struct  m0_co_locals_allocator
 
struct  m0_co_context
 
struct  m0_co_op
 

Macros

#define __MOTR_LIB_COROUTINE_H__
 
#define M0_CO_START(context)
 
#define M0_CO_END(context)
 
#define M0_CO_FUN(context, function)
 
#define M0_CO_FRAME_DATA(field)   (__frame_data__->field)
 
#define M0_CO_REENTER(context, ...)
 
#define M0_CO__REENTER(context, frame_data)
 
#define M0_CO_YIELD_RC(context, rc)
 
#define M0_CO_YIELD(context)   M0_CO_YIELD_RC(context, -EAGAIN)
 

Enumerations

enum  {
  M0_MCC_STACK_NR = 0x20, M0_MCC_LOCALS_ALLOC_SZ = 4096, M0_MCC_LOCALS_ALLOC_SHIFT = 3, M0_MCC_LOCALS_ALLOC_ALIGN = 1ULL << M0_MCC_LOCALS_ALLOC_SHIFT,
  M0_MCC_LOCALS_ALLOC_PAD_SZ = 2 * M0_MCC_LOCALS_ALLOC_ALIGN
}
 

Functions

M0_INTERNAL int m0_co_context_init (struct m0_co_context *context)
 
M0_INTERNAL void m0_co_context_fini (struct m0_co_context *context)
 
M0_INTERNAL void * m0_co_context_locals (struct m0_co_context *context)
 
M0_INTERNAL void m0_co_context_locals_alloc (struct m0_co_context *context, uint64_t size)
 
M0_INTERNAL void m0_co_context_locals_free (struct m0_co_context *context)
 
M0_INTERNAL void m0_co_op_init (struct m0_co_op *op)
 
M0_INTERNAL void m0_co_op_fini (struct m0_co_op *op)
 
M0_INTERNAL void m0_co_op_reset (struct m0_co_op *op)
 
M0_INTERNAL void m0_co_op_active (struct m0_co_op *op)
 
M0_INTERNAL void m0_co_op_done (struct m0_co_op *op)
 
M0_INTERNAL int m0_co_op_tick_ret (struct m0_co_op *op, struct m0_fom *fom, int next_state)
 

Macro Definition Documentation

◆ __MOTR_LIB_COROUTINE_H__

#define __MOTR_LIB_COROUTINE_H__

Definition at line 26 of file coroutine.h.