1#ifndef GREENLET_SLP_SWITCH_HPP
2#define GREENLET_SLP_SWITCH_HPP
4#include "greenlet_compiler_compat.hpp"
5#include "greenlet_refs.hpp"
47static int GREENLET_NOINLINE(slp_save_state_trampoline)(
char* stackref);
48static void GREENLET_NOINLINE(slp_restore_state_trampoline)();
52#define SLP_SAVE_STATE(stackref, stsizediff) \
54 assert(switching_thread_state); \
55 stackref += STACK_MAGIC; \
56 if (slp_save_state_trampoline((char*)stackref)) \
58 if (!switching_thread_state->active()) \
60 stsizediff = switching_thread_state->stack_start() - (char*)stackref; \
63#define SLP_RESTORE_STATE() slp_restore_state_trampoline()
67#define slp_switch GREENLET_NOINLINE(slp_switch)
68#include "slp_platformselect.h"
74 "greenlet needs to be ported to this platform, or taught how to detect your compiler properly."
86slp_save_state_asm(intptr_t* ref)
89 SLP_SAVE_STATE(ref, diff);
94slp_restore_state_asm(
void)
99extern int slp_switch(
void);
Definition TGreenlet.hpp:343