⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mypthread.h

📁 larbin是一种开源的网络爬虫/网络蜘蛛
💻 H
字号:
// Larbin// Sebastien Ailleret// 13-06-01 -> 07-12-01#ifndef MYTHREAD_H#define MYTHREAD_H#include <pthread.h>#include "options.h"#ifdef THREAD_OUTPUT#define mypthread_cond_init(x,y) pthread_cond_init(x,y)#define mypthread_cond_destroy(x) pthread_cond_destroy(x)#define mypthread_cond_wait(c,x,y) while (c) { pthread_cond_wait(x,y); }#define mypthread_cond_broadcast(x) pthread_cond_broadcast(x)#define mypthread_mutex_init(x,y) pthread_mutex_init(x,y)#define mypthread_mutex_destroy(x) pthread_mutex_destroy(x)#define mypthread_mutex_lock(x) pthread_mutex_lock(x)#define mypthread_mutex_unlock(x) pthread_mutex_unlock(x)#else#define mypthread_cond_init(x,y) ((void) 0)#define mypthread_cond_destroy(x) ((void) 0)#define mypthread_cond_wait(c,x,y) ((void) 0)#define mypthread_cond_broadcast(x) ((void) 0)#define mypthread_mutex_init(x,y) ((void) 0)#define mypthread_mutex_destroy(x) ((void) 0)#define mypthread_mutex_lock(x) ((void) 0)#define mypthread_mutex_unlock(x) ((void) 0)#endif // THREAD_OUTPUTtypedef void* (*StartFun) (void *);void startThread (StartFun run, void *arg);#endif // MYTHREAD_H

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -