pthr_subs.h

来自「序列对齐 Compare a protein sequence to a pr」· C头文件 代码 · 共 53 行

H
53
字号
/* $Name: fa35_03_06 $ - $Id: pthr_subs.h,v 1.5 2007/06/29 20:23:58 wrp Exp $ */#include <pthread.h>/* error macro for thread calls */#define check(status,string) \   if (status != 0) {fprintf(stderr,string); \     fprintf(stderr,"%s\n",strerror(status)); } /* error macro *//*#define check(status,string) \     if (status == -1) perror(string)  */ /* error macro for thread calls */#ifndef XTERNALpthread_t threads[MAX_WORKERS];/* reader stuff */pthread_mutex_t reader_mutex;      /* empty buffer pointer structure lock */pthread_cond_t reader_cond_var;    /* condition variable for reader */pthread_mutex_t worker_mutex;      /* full buffer pointer structure lock */pthread_cond_t worker_cond_var;    /* condition variable for workers *//* condition variable stuff */pthread_mutex_t start_mutex;       /* start-up synchronisation lock */pthread_cond_t start_cond_var;     /* start-up synchronisation condition variable */#elseextern pthread_t threads[];/* mutex stuff */extern pthread_mutex_t reader_mutex;extern pthread_mutex_t worker_mutex;/* condition variable stuff */extern pthread_cond_t reader_cond_var;extern pthread_cond_t worker_cond_var;extern pthread_mutex_t start_mutex;extern pthread_cond_t start_cond_var;extern int start_thread;#endif

⌨️ 快捷键说明

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