example

所属分类:网络
开发工具:Unix_Linux
文件大小:2KB
下载次数:62
上传日期:2009-12-29 21:36:43
上 传 者amaork
说明:  利用共享内存实现多线程间通信。 主线程派生子线程后即处于休眠状态,等待子线程结束时发出结束信号唤醒。在被唤醒后,主线程向屏幕输出结束信息! 线程A向共享内存中写入A~Z的大写字母。 线程B通过共享内存接收这些字母,并将其保存到/test.dat文件中。 注意线程之间的同步互斥!
(Using shared memory communication between multi-threading. Derived from sub-thread after main thread is in sleep mode, waiting for the end of the child issued by the end of the thread wake-up signal. After being awakened, the main thread to the end of the output information on the screen! Thread A writes to the shared memory, A ~ Z of the capital letters. Thread B through shared memory to receive these letters, and save it to/test.dat file. Note that the synchronization between threads mutually exclusive!)

文件列表:
example (0, 2009-12-29)
example\Makefile (173, 2009-12-29)
example\shm_thread.c (4851, 2009-12-29)

近期下载者

相关文件


收藏者