搜索资源列表
libthread_new
- 实现了一个线程池。其中运用了队列,以避免任务丢失。在队列和线程池之间创建了一个中间夹层,以提高可移植性。当任务来时,先压入队列,然后唤醒线程执行操作。线程完成任务后,再去队列查询,如果有任务就去执行,没有则阻塞,等待-Implements a thread pool. The application the queue, to avoid task lost. In the queue and thread pool between to create a intermediate sandwi
message
- 该程序首先通过fork()函数分别创建Client进程和Server进程,然后通过msgget()函数创建消息队列,由Client使用msgsnd()函数向Server进程发送一个消息,Server进程通过msgrcv()函数从消息队列中接收到消息后,通过msgsnd()函数向Client进程发送回一个响应,之后,通过sleep()函数,等待Client进程从消息队列中读取了消息后,删除消息队列。-The program first by fork () function, create se
thread
- 概述一下原理和每个类的作用 (1): CTask 一个任务基类,作为线程的参数用 (2): CWorkThread:工作线程类,轮询检测参数是否可用,如果可用的话, 就去调用参数CTask的执 行函数Execute,如果参数不可用就等待 (3): CWorkQueue:是一个任务队列,里面装载CTask子类的对象,是一个对象的容器 (4): CWorkThreadPool:工作线程池,其中包含了工作线程组,调度线程,调度线程不停的检测 任务队列中是否有可用
Linux-driver-development8
- 作者:华清远见嵌入式学院。《Linux设备驱动开发详解》(08&09年度畅销榜TOP50)第8章、Linux设备驱动中的阻塞与非阻塞I/O。阻塞和非阻塞I/O是设备访问的两种不同模式,驱动程序可以灵活地支持用户空间对设备的这两种访问方式。8.1节讲解阻塞I/O和非阻塞I/O的区别,实现阻塞I/O的等待队列机制,以及在globalfifo设备驱动中增加对阻塞I/O支持的方法,并进行了用户空间的验证。8.2节讲解设备驱动的轮询(poll)操作的概念和编程方法,poll操作可以帮助用户了解是否能对设备
BlockingQueue
- A java.util.Queue that additionally supports operations that wait for the queue to become non-empty when retrieving an element, and wait for space to become available in the queue when storing an element.
SynchronousQueue
- A {@linkplain BlockingQueue blocking queue in which each insert operation must wait for a corresponding remove operation by another thread, and vice versa.
virtio_test
- TODO: this pretty bad: we get a cache line bounce for the wait queue on poll and another one on read, plus the read which is there just to clear the current state. -TODO: this is pretty bad: we get a cache line bounce for the wait queue on poll and
dbri_subr
- Clear out structures. This also intializes the command queue to all DBRI WAIT s since the WAIT opcode is 0.
queue
- de_queue: dequeue a message the specified queue. handle remote signals, wait for a msg to arrive, dequeue the msg. -de_queue: dequeue a message the specified queue. handle remote signals, wait for a msg to arrive, dequeue the msg.