搜索资源列表
chengxuyuanma
- 用多线程同步方法解决读者阅览问题 1) 每个读者进入阅览室后,即时显示“Entered” 及其线程自定义标识,还同时显示阅览室共有几名顾客及其所坐的位置。 2) 至少有10个读者,每人阅览至少3秒钟。 3) 多个读者须共享操作函数代码。 2总的设计思想及系统平台、语言、工具: 设计思想:程序设定的是10个读者和5个座位,对读者进行编号,依次进入阅览室读书,为每一座位列一表目,包括座号和读者号等,读者离开时要登出,即消掉登记的信息。 系统平台:LINUX 语言:C语言
ebus.tar
- 程序主要功能:linux 下通过串口控制智能系统,zo-b8l5a 5a八通道双值输出模块。一、 对应文件:ebus_module.tar.gz(包含三个文件ebus.cc、ebus.h、ebus_test.cc) 其中ebus.h是包含class E_bus的定义和声明的头文件;ebus.cc主要是类里面的函数;ebus_test.cc主要是类的使用,完成了循环依次关闭8路输出,打开8路输出的功能。二、 E_bus类的接口说明:打开或者关闭输出口,只需要函数int E_bus::ebus_
framebuffer
- 帧缓冲#include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdint.h> #include <unistd.h> #include <fcntl.h> #include <sys/ioctl.h> #include <sys/mman.h> #include <
UNIXCcode
- 用C语言编写的Unix代码实例 供大家参考 -#include <sys/sem.h> #include <sys/types.h> #include <sys/ipc.h> #include <stdio.h> #include <sys/stat.h> #define VERIFYERR(a, b) if (a) fprintf(stderr, " s failed.\n", b) else fp
guard-2
- 个人编写的一个十分好用的函数,可以设置程序成为后台守护进程, 调用十分简单,在程序中调用函数deamon即可,以下是函数原型 int daemon(int nochdir, int noclose) 其中 nochdir 为是否修改当前目录-Individual written a very useful function, you can set the program to become a background daemon, called very sim
msg
- 消息队列是一个链表,链表的每一个结点是一个消息。消息队列存放在内核中并由消息队列标示符标识。 对消息队列的操作有下面三种类型: a. 打开或创建消息队列 int msgget(key_t key, int flag) 参数key是一个键值,由ftok函数获得, flg参数是一些标志位。函数返回与健值key相对对应的消息队列描述字。 b. 读写操作 int msgsnd(int msqid, const void *ptr, size_t nbytes, int flag
SDL_stdinc
- Use proper C++ casts when compiled as C++ to be compatible with the option -Wold-style-cast of GCC (and -Werror=old-style-cast in GCC 4.2 and above.Enable enums always int in CodeWarrior.
