tc_fcontext.h 358 B

123456789101112131415161718192021
  1. #ifndef _TC_CONTEXT_FCONTEXT_H
  2. #define _TC_CONTEXT_FCONTEXT_H
  3. namespace tars
  4. {
  5. typedef void* fcontext_t;
  6. struct transfer_t {
  7. fcontext_t fctx;
  8. void * data;
  9. };
  10. extern "C" transfer_t jump_fcontext( fcontext_t const to, void * vp);
  11. extern "C" fcontext_t make_fcontext( void * sp, std::size_t size, void (* fn)( transfer_t) );
  12. }
  13. #endif