linux c 线程 thread 例程
这个例程是 libusb 里面的例子程序dpfp.c
用到了信号量,pthread_join,还有 win32版本的 实现方式。
sem_post
libusb-1.0.26
#include <fcntl.h>
#include <pthread.h>
#include <semaphore.h>
#include <unistd.h>
#define THREAD_RETURN_VALUE NULL
typedef sem_t * semaphore_t;
typedef pthread_t thread_t;