2019-07-27 22:44:32 +08:00
|
|
|
|
#ifndef ACL_INIT_INCLUDE_H
|
2014-11-19 00:25:21 +08:00
|
|
|
|
#define ACL_INIT_INCLUDE_H
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
2017-06-02 14:47:24 +08:00
|
|
|
|
#include "../stdlib/acl_define.h"
|
2014-11-19 00:25:21 +08:00
|
|
|
|
|
|
|
|
|
/**
|
2019-07-27 22:44:32 +08:00
|
|
|
|
* 初始化整个ACL库
|
2014-11-19 00:25:21 +08:00
|
|
|
|
*/
|
2016-10-25 10:31:33 +08:00
|
|
|
|
ACL_API void acl_lib_init(void);
|
2014-11-19 00:25:21 +08:00
|
|
|
|
|
|
|
|
|
/**
|
2019-07-27 22:44:32 +08:00
|
|
|
|
* 结束整个ACL库
|
2014-11-19 00:25:21 +08:00
|
|
|
|
*/
|
2016-10-25 10:31:33 +08:00
|
|
|
|
ACL_API void acl_lib_end(void);
|
2014-11-19 00:25:21 +08:00
|
|
|
|
|
|
|
|
|
/**
|
2019-07-27 22:44:32 +08:00
|
|
|
|
* 是否优先使用 poll 而非 select
|
|
|
|
|
* @param yesno {int} 非 0 时表示优先使用 poll
|
2014-11-19 00:25:21 +08:00
|
|
|
|
*/
|
|
|
|
|
ACL_API void acl_poll_prefered(int yesno);
|
|
|
|
|
|
|
|
|
|
/**
|
2019-07-27 22:44:32 +08:00
|
|
|
|
* 获得当前 acl 库的版本信息
|
|
|
|
|
* @return {const char*} 当前 acl 库版本信息
|
2014-11-19 00:25:21 +08:00
|
|
|
|
*/
|
|
|
|
|
ACL_API const char *acl_version(void);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2019-07-27 22:44:32 +08:00
|
|
|
|
* 获得主线程的线程号
|
2014-11-19 00:25:21 +08:00
|
|
|
|
* @return {unsigned int}
|
|
|
|
|
*/
|
|
|
|
|
ACL_API unsigned long acl_main_thread_self(void);
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|