易截截图软件、单文件、免安装、纯绿色、仅160KB

关机和重启在Linux Kernel中的哪些函数里实现?

关机和重启在Linux Kernel中的哪些函数里实现。
reboot的最终实现在arch_reset()函数,它通常定义在arch/arm/mach-xxx/include/mach/system.h里。system.h被ARM kernel的public code应用,因此你需要定义这个头文件,并实现它。
arch_reset的函数原型为
void arch_reset(char mode) 
void arch_reset(char mode) 
关机需要将pm_power_off这个函数指针指向你自己的实现函数。函数指针是这样定义的
void (*pm_power_off)(void); 


相关文档:

实战Linux Bluetooth编程(三) HCI层编程

1. HCI层协议概述:
HCI提供一套统一的方法来访问Bluetooth底层。如图所示:
从图上可以看出,Host Controller Interface(HCI)  就是用来沟通Host和Module。Host通常就是PC, Module则是以各种物理连接形式(USB,serial,pc-card等)连接到PC上的bluetooth Dongle。
在Host这一端:application,SDP,L2cap等协议 ......

实战Linux Bluetooth编程(六) L2CAP编程实例

例一:发送Signaling Packet:
Signaling Command是2个Bluetooth实体之间的L2CAP层命令传输。所以得Signaling Command使用CID 0x0001.
多个Command可以在一个C-frame(control frame)中发送。
 如果要直接发送Signaling Command.需要建立SOCK_RAW类型的L2CAP连接Socket。这样才有机会自己填充Command Code,Identi ......

将 Linux 应用程序移植到 64 位系统上


平滑迁移的技巧和技术
文档选项
<tr
valign="top"><td width="8"><img alt="" height="1" width="8"
src="//www.ibm.com/i/c.gif"/></td><td width="16"><img alt="" width="16"
heig ......

linux epoll用于socket控制 代码实例

关于epoll使用方法:
参照:  http://linux.die.net/man/4/epoll
实例代码:(来自网上某论坛)
#include <pthread.h>
#include <stdio.h>
#include <sys/timeb.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/epoll.h> ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号