libco
practer
懒得写的简介
展开
-
co_routine.h分析
co_routine.h #ifndef __CO_ROUTINE_H__ #define __CO_ROUTINE_H__ #include <stdint.h> #include <sys/poll.h> #include <pthread.h> //1.struct struct stCoRoutine_t;//协程的结构体 用来存储协程相关的信...原创 2019-08-31 15:56:04 · 279 阅读 · 0 评论 -
libco简要分析(待更)
文章目录源码分析co_routine.h 本篇分析分为两个部分。libco源码分析。libco例子分析。首先进行源码的分析。 分析之前需要了解一下前置知识 1.什么是协程? 2.什么是共享栈? 源码分析思路:对每个.h.cpp进行分析,先分析.h再分析对应的.cpp。 建议阅读顺序:结构体->与结构体关系紧密的函数->其他函数 建议例子和源码分析一起阅读,阅读体验更佳。另外参考了大量其...原创 2019-08-31 15:48:48 · 235 阅读 · 0 评论 -
co_routine.cpp分析
co_routine.cpp #include "co_routine.h" #include "co_routine_inner.h" #include "co_epoll.h" #include <string.h> #include <stdlib.h> #include <stdio.h> #include <string> #inclu...原创 2019-09-02 22:48:08 · 341 阅读 · 0 评论