摘要:
#include #include #include #include int count,v1,v2;int flags = 1;sem_t sem;pthread_mutex_t mt;void *fun(void *arg){ int ret = -1; while(1) {#if 0 ret = sem_wait(&sem); if ( -1 == ret ) { perror("sem_init"); return ; }#else ret = pthr... 阅读全文