文件名称:pthread
- 所属分类:
- Linux/Unix编程
- 资源属性:
- [C/C++] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 1kb
- 下载次数:
- 0次
- 提 供 者:
- 刘*
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
基于ARM9的Linux多线程应用程序。生产者写入缓冲区和消费者从缓冲区读数的具体流程,生产者首先获得互斥锁,并且判断写指针+1后是否等于读指针,如果相等则进入等待状态,等候条件变量notfull;如果不等则向缓冲区中写入一个整数,并且设置条件变量为notempty,最后释放互斥锁。消费者线程与生产者线程类似。-ARM9-Linux-based multi-threaded applications. Producers and consumers into a buffer from the buffer readings of specific processes, producers first obtain a mutex lock, and to determine whether the write pointer is equal to+1 after reading pointer, if the same may enter the wait state, waiting for condition variables notfull if the ranging from the buffer to write to an integer, and set the condition variable notempty, the final release mutex. Consumer thread and producers similar thread.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Makefile.bak
pthread.c
pthread.c