资源简介

windows下协程实现(fiber、汇编、非共享栈、共享栈)

资源截图

代码片段和文件信息

#include 
#include 
#ifdef __cplusplus
extern “C“ 
{
#include “coctx.h“
}
#endif

//----- --------
// 32 bit
// | regs[0]: ret |
// | regs[1]: ebx |
// | regs[2]: ecx |
// | regs[3]: edx |
// | regs[4]: edi |
// | regs[5]: esi |
// | regs[6]: ebp |
// | regs[7]: eax |  = esp
enum
{
kEIP = 0
kESP = 7
};

//-------------
// 64 bit
//low | regs[0]: r15 |
//    | regs[1]: r14 |
//    | regs[2]: r13 |
//    | regs[3]: r12 |
//    | regs[4]: r9  |
//    | regs[5]: r8  | 
//    | regs[6]: rbp |
//    | regs[7]: rdi |
//    | regs[8]: rsi |
//    | regs[9]: ret |  //ret func addr
//    | regs[10]: rdx |
//    | regs[11]: rcx | 
//    | regs[12]: rbx |
//hig | regs[13]: rsp |
enum
{
kRDI = 7
kRSI = 8
kRETAddr = 9
kRSP = 13
};


#if defined(__i386__) || defi

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       1289  2016-10-13 16:05  协程学习\Clear.bat

     文件       4618  2017-01-24 09:48  协程学习\coroutine_study\coctx.cpp

     文件        809  2017-01-19 15:02  协程学习\coroutine_study\coctx.h

     文件        560  2017-01-20 15:52  协程学习\coroutine_study\coroutine.h

     文件       3642  2017-01-20 15:54  协程学习\coroutine_study\coroutine_fiber\coroutine_fiber.c

     文件       7568  2017-01-21 11:19  协程学习\coroutine_study\coroutine_fiber\coroutine_fiber.vcxproj

     文件       1185  2017-01-19 21:29  协程学习\coroutine_study\coroutine_fiber\coroutine_fiber.vcxproj.filters

     文件       1292  2017-01-20 15:58  协程学习\coroutine_study\coroutine_fiber\Debug\coroutine_fiber.Build.CppClean.log

     文件       1652  2017-01-20 15:58  协程学习\coroutine_study\coroutine_fiber\Debug\coroutine_fiber.log

     文件       1370  2017-01-20 15:58  协程学习\coroutine_study\coroutine_fiber\Debug\coroutine_fiber.tlog\cl.command.1.tlog

     文件      20278  2017-01-20 15:58  协程学习\coroutine_study\coroutine_fiber\Debug\coroutine_fiber.tlog\CL.read.1.tlog

     文件       1512  2017-01-20 15:58  协程学习\coroutine_study\coroutine_fiber\Debug\coroutine_fiber.tlog\CL.write.1.tlog

     文件        187  2017-01-20 15:58  协程学习\coroutine_study\coroutine_fiber\Debug\coroutine_fiber.tlog\coroutine_fiber.lastbuildstate

     文件       1516  2017-01-20 15:58  协程学习\coroutine_study\coroutine_fiber\Debug\coroutine_fiber.tlog\link.command.1.tlog

     文件       3162  2017-01-20 15:58  协程学习\coroutine_study\coroutine_fiber\Debug\coroutine_fiber.tlog\link.read.1.tlog

     文件        774  2017-01-20 15:58  协程学习\coroutine_study\coroutine_fiber\Debug\coroutine_fiber.tlog\link.write.1.tlog

     文件       2141  2017-01-20 10:29  协程学习\coroutine_study\coroutine_fiber\Release\coroutine_fiber.log

     文件       1466  2017-01-20 10:29  协程学习\coroutine_study\coroutine_fiber\Release\coroutine_fiber.tlog\cl.command.1.tlog

     文件      19092  2017-01-20 10:29  协程学习\coroutine_study\coroutine_fiber\Release\coroutine_fiber.tlog\CL.read.1.tlog

     文件       1374  2017-01-20 10:29  协程学习\coroutine_study\coroutine_fiber\Release\coroutine_fiber.tlog\CL.write.1.tlog

     文件        189  2017-01-20 10:29  协程学习\coroutine_study\coroutine_fiber\Release\coroutine_fiber.tlog\coroutine_fiber.lastbuildstate

     文件       1616  2017-01-20 10:29  协程学习\coroutine_study\coroutine_fiber\Release\coroutine_fiber.tlog\link.command.1.tlog

     文件       3462  2017-01-20 10:29  协程学习\coroutine_study\coroutine_fiber\Release\coroutine_fiber.tlog\link.read.1.tlog

     文件        644  2017-01-20 10:29  协程学习\coroutine_study\coroutine_fiber\Release\coroutine_fiber.tlog\link.write.1.tlog

     文件       1189  2017-01-17 16:04  协程学习\coroutine_study\coroutine_libco_mytest\coctx.h

     文件       7553  2017-01-21 11:19  协程学习\coroutine_study\coroutine_libco_mytest\coroutine_libco_mytest.vcxproj

     文件       1466  2017-01-20 10:35  协程学习\coroutine_study\coroutine_libco_mytest\coroutine_libco_mytest.vcxproj.filters

     文件       2727  2017-01-17 15:46  协程学习\coroutine_study\coroutine_libco_mytest\co_routine.h

     文件       2301  2016-12-07 06:32  协程学习\coroutine_study\coroutine_libco_mytest\co_routine_inner.h

     文件       2246  2017-01-17 15:43  协程学习\coroutine_study\coroutine_libco_mytest\co_routine_specific.h

............此处省略751个文件信息

评论

共有 条评论