摘要:
#include int interruptID;const struct sigevent *intHandler (void *arg, int id){ ...}intmain (int argc, char **argv){ ... interruptID = Interr... 阅读全文
摘要:
#include #include #include #include #include #define MAX 10pthread_t thread[2];pthread_mutex_t mut;int number=0,i;void *thread1(){while(1){number=i;pr... 阅读全文
摘要:
原文网址:http://blog.csdn.net/daniellee_ustb/article/details/7841894 在操作系统中,对于中断的处理一直是一件麻烦事,其实主要是对操作系统的中断管理机制不熟悉。当中断产生时,内核去执行中断服务程序ISR,中断服务程序中要做尽量少的工作,以提高... 阅读全文
摘要:
#include #include #include pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;int count = 0;void* function1( void* arg ){ int tmp = 0; while( 1 )... 阅读全文