关于ioctl
create, read write,seek, close都好明白一直对ioctl这个东西最糊涂,字面意思当然是控制输入输出的
我想让大家帮我的认识进行一下确认
用面向对象的方式说明
ioctl就是施加给对象(譬如实际数据是一块buffer)的各种操作
譬如我定义一个video device
ioctl (fd, 画圆的指令, struct 圆的各种参数)
是不是可以这么理解? 看看源码没有,能理解read write,close为什么就不能理解ioctl,简单的说都是应用程序跟硬件打交道的接口了,你就先这么理解好了 to bierdaci
你不说清楚也不用...损我吧
:neutral: u can use that ioctl to finish the drawing command u want
but most of the time, it do some control command. like start device, stop device, get device information...
since read, open, close, write are already fixed, this is the only place u can expand the functionalities.
页:
[1]