码迷,mamicode.com
首页 >  
搜索关键字:fcntl    ( 291个结果
Linux之初试驱动20160613
这篇文章主要介绍一下Linux内核下的驱动结构与书写,以及介绍Linux下简单使用驱动的应用程序: 首先我们直接看使用驱动的简单应用程序: #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <stdio. ...
分类:系统相关   时间:2016-06-14 00:59:45    阅读次数:229
cgi方式服务器
#pragmaonce #include<stdio.h> #include<stdlib.h> #include<string.h> #include<sys/types.h> #include<sys/socket.h> #include<sys/sendfile.h> #include<sys/stat.h> #include<unistd.h> #include<fcntl.h> #includ..
分类:其他好文   时间:2016-06-06 01:27:54    阅读次数:171
小型web服务器
#pragmaonce #include<stdio.h> #include<stdlib.h> #include<string.h> #include<sys/types.h> #include<sys/socket.h> #include<sys/sendfile.h> #include<fcntl.h> #include<netinet/in.h> #include<arpa/inet.h> #i..
分类:Web程序   时间:2016-06-03 23:10:26    阅读次数:475
APUE(3)---文件I/O
一、引言 UNIX系统中的大多数文件对I/O只需用到5个函数:open/read/write/lseek和close,这些函数都是不带缓冲I/O(Unbuffered I/O)。只要涉及到多个进程间共享资源,原子操作的概念就变得非常重要,后面将介绍:dup/fcntl/sync/fsync和ioct ...
分类:其他好文   时间:2016-05-31 00:39:12    阅读次数:272
Linux下虚拟网卡tun/tap
#include <stdio.h>#include <string.h>#include <linux/if_tun.h>#include <sys/types.h>#include <net/if.h>#include <sys/stat.h>#include <fcntl.h>#include ...
分类:系统相关   时间:2016-05-13 09:45:26    阅读次数:183
模块移除 命令rmmod 的实现
// rmmod.c #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <fcntl.h> #include <string.h> #include <errno.h> int main(int argc, cha ...
分类:其他好文   时间:2016-04-17 00:29:31    阅读次数:100
udp套接字使用信号驱动式I/O
信号驱动式I/O的本质就是:进程预先告知内核当某个描写叙述符发生事件时,内核会向该进程发送SIGIO信号通知进程,进程可在信号处理函数中进行处理 进程能够通过fcntl打开O_ASYNC标志或ioctl打开FIOASYNC标志来通知内核,二者的差别是一些系统不支持fcntl,所以应尽量使用ioctl ...
分类:其他好文   时间:2016-04-02 20:20:25    阅读次数:243
linux驱动的异步通知(kill_fasync,fasync)---- 驱动程序向应用程序发送信号
应用程序 [cpp] view plain copy #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <stdio.h> #include <poll.h> #include <signal.h> #i ...
分类:系统相关   时间:2016-03-27 13:52:22    阅读次数:1407
qt文件目录迭代器基本使用
//#include <fcntl.h> //#include <sys/types.h>//#include <unistd.h> //#include <stdio.h> checkFileNum::checkFileNumPro(){ // **************************
分类:其他好文   时间:2016-03-10 10:36:14    阅读次数:179
Understanding Unix/Linux Programming-who指令练习
1 /*Apply a Buffer trick in who3.c*/ 2 3 #include <stdio.h> 4 #include <stdlib.h> 5 #include <utmp.h> 6 #include <fcntl.h> 7 #include <unistd.h> 8 #in
分类:系统相关   时间:2016-03-07 23:54:27    阅读次数:369
291条   上一页 1 ... 17 18 19 20 21 ... 30 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!