摘要:
PostThreadMessage将一个消息放入(寄送)到指定线程的消息队列里,不等待线程处理消息就返回。既可以发送消息给工作线程,也可以发送给UI线程。其原型如下:BOOL PostThreadMessage( DWORD idThread, UINT Msg, WPARAM wParam, LPARAM lParam);idThread:其消息将被寄送的线程的线程标识符。如果线程没有消息队列,此函数将失败。当线程第一次调用一个Win 32 USER或GDI函数时,系统创建线程的消息队列。要得到更多的信息,参见备注。Msg:指定将被寄送的消息的类型。... 阅读全文
摘要:
#ifndef __RING_BUFFER_H__#define __RING_BUFFER_H__//------------------------------------------------------------------------------// External functions//------------------------------------------------------------------------------void BSP_Lock( void );void BSP_Unlock( void );typedef struct{... 阅读全文
摘要:
#ifndef __CIRCLE_BUFFER_H__#define __CIRCLE_BUFFER_H__/* * http://en.wikipedia.org/wiki/Circular_buffer : Mirroring * * The capacity of circle buffer must be a power of two ! * * The source and sink of data can implement independent policies for dealing * with a full buffer and overrun while adherin 阅读全文