coroutine: libmill.h
libmill是一个基于c语言开发的go风格协程库,实现了go风格的协程操作、chan操作、非阻塞的网络io操作等等,是一个不错的linux平台下c风格协程库实现。如果你想从0到1的快速了解如何开发一个协程库,libmill将是一个非常不错的案例;如果你想更深入地了解go,libmill里面也借鉴了go的一些设计思想;或者你想在生产环境中使用,开发者也提供了一个更健壮的版本libdill。
// ABI应用程序二进制接口
#define MILL_VERSION_CURRENT 19 // 主版本
#define MILL_VERSION_REVISION 1 // 修订版本
#define MILL_VERSION_AGE 1 // 支持过去的几个版本#if !defined __GNUC__ && !defined __clang__
#error "Unsupported compiler!"
#endif
#if defined MILL_NO_EXPORTS
# define MILL_EXPORT
#else
# if defined _WIN32
# ......
# else
# if defined __SUNPRO_C
# ......
# elif (defined __GNUC__ && __GNUC__ >= 4) || defined __INTEL_COMPILER || defined __clang__
# define MILL_EXPORT __attribute__ ((visibility("default")))
# else
# define MILL_EXPORT
# endif
# endif
#endifLast updated