1 Star 0 Fork 2

jxva/ngx_thread

forked from laozi2/ngx_thread 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
ngx_thread.h 918 Bytes
一键复制 编辑 原始数据 按行查看 历史
laozi2 提交于 2017-03-14 19:01 +08:00 . first commit
#ifndef _NGX_THREAD_H_INCLUDED_
#define _NGX_THREAD_H_INCLUDED_
//#if (NGX_THREADS)
#include "ngx_common.h"
typedef pthread_mutex_t ngx_thread_mutex_t;
ngx_int_t ngx_thread_mutex_create(ngx_thread_mutex_t *mtx);
ngx_int_t ngx_thread_mutex_destroy(ngx_thread_mutex_t *mtx);
ngx_int_t ngx_thread_mutex_lock(ngx_thread_mutex_t *mtx);
ngx_int_t ngx_thread_mutex_unlock(ngx_thread_mutex_t *mtx);
typedef pthread_cond_t ngx_thread_cond_t;
ngx_int_t ngx_thread_cond_create(ngx_thread_cond_t *cond);
ngx_int_t ngx_thread_cond_destroy(ngx_thread_cond_t *cond);
ngx_int_t ngx_thread_cond_signal(ngx_thread_cond_t *cond);
ngx_int_t ngx_thread_cond_wait(ngx_thread_cond_t *cond, ngx_thread_mutex_t *mtx);
typedef pid_t ngx_tid_t;
#define NGX_TID_T_FMT "%P"
ngx_tid_t ngx_thread_tid(void);
#define ngx_log_tid ngx_thread_tid()
extern ngx_int_t ngx_ncpu;
#endif /* _NGX_THREAD_H_INCLUDED_ */
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/jxva/ngx_thread.git
git@gitee.com:jxva/ngx_thread.git
jxva
ngx_thread
ngx_thread
master

搜索帮助