在linux中使用structnet_device结构体来描述每一个网络设备。同时这个用来刻画网络设备的structnet_device结构体包含的字段非常的多,以至于内核的开发者都觉得在现在的linux内核中,这个structnet_device是一个大的错误。在本篇文章中,只介绍structnet_device中的一些字段,..
分类:
Web程序 时间:
2014-12-01 06:36:24
阅读次数:
232
这个程序是《Linux device drivers》中的代码片段: #include #include MODULE_LICENSE("Dual BSD/GPL"); static int hello_init(void)
{ printk(KERN_ALERT "Hello,world\n");...
分类:
其他好文 时间:
2014-11-30 16:44:37
阅读次数:
212
structnet结构体表示的内核中的网络命名空间(net_namespace)。在linux内核中,每一个网络设备(structnet_device)都有一个所属的网络命名空间,至于一个网络设备是属于内核中的那一个网络命名空间,在介绍网络设备(structnet_device。在linux内核中,用structnet_device来刻画一..
分类:
Web程序 时间:
2014-11-30 08:14:24
阅读次数:
257
1. 单位- px(pixel): 普通的像素点描述,位图中的一个颜色点(RGBA或者YUV)- dip(device independent pixels): 设备独立像素。- dp: 与dip一样。- pt(point): 标准长度单位。1pt = 1.0 / 72 (in)。- sp(scal...
分类:
移动开发 时间:
2014-11-30 00:15:13
阅读次数:
241
1、媒体查询,包含将帮助您快速开始自己的多屏幕网站开发的示例。2、前5项功能(width、height、device-width、device-height和orientation)是最有用的。3、为移动电话、平板电脑和桌面计算机提供不同的式样4、添加带有这些设置的视口标签能够确保智能手机和平板电脑...
分类:
其他好文 时间:
2014-11-29 15:55:53
阅读次数:
153
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
IPADDR=192.168.0.116
NETMASK=255.255.0.0
GATEWAY=192.168.0.1
ONBOOT=yes
TYPE=Ethernet
重启配置文件使之生效
# /etc/init.d/network restart
Shutting down interface eth0: [ OK ]
Shutt...
分类:
系统相关 时间:
2014-11-29 14:40:52
阅读次数:
205
将数据加载到GPU后,如何在grid下的block进行并行计算(一个grid包含多个block)/****How do we run code in parallel on the device****/ /****Use block****/ _global_ void add(int...
分类:
其他好文 时间:
2014-11-29 11:44:48
阅读次数:
156
You can easily use a PC's printer port for serial-EEPROM programming. You can use a device-programmer circuit used to program the MicroWire serial EE-...
分类:
其他好文 时间:
2014-11-28 14:18:55
阅读次数:
226
In new mixed-voltage systems, it is often necessary to level-shift a control signal from a high level to a low level. An open-drain device, such as th...
分类:
其他好文 时间:
2014-11-28 14:16:23
阅读次数:
206
Well-regulated, dual-polarity power supplies find wide use in disk-drive, handheld-device, automotive, and notebook-computer applications. In these ap...
分类:
其他好文 时间:
2014-11-28 14:15:58
阅读次数:
315