linux ½ø³ÌµÄ×ÊԴʹÓÃ
LinuxÄÚºË×·×Ùÿ¸ö½ø³ÌʹÓõÄ×Ê ±ÈÈç ¶ÑÕ» ´úÂë¶Î Êý¾Ý¶Î ÔËÐеÄλÖÃ
int getrusage(int who , struct rusage * usage) ¼ì²é½ø³Ì±¾Éí£¬×Ó½ø³Ì»òÕßÁ½ÕßÖ®ºÍµÄ×ÊԴʹÓÃ
º¯Êý·µ»ØÒ»¸öusage½á¹¹£¬´æ·Å½ø³ÌʹÓõÄ×ÊÔ´
usageÊǺܳ¤µÄLinuxÖ»ÓÃÇ°ÎåÏî
whoÖ¸Ã÷ʹÓõÄ×ÊÔ´ÖÐÄÄÒ»ÖÖ½«±»·µ»Ø£¬whoÓÐÈýÖÖÈ¡Öµ
RUSAGE_SELF ½ø³Ì±¾ÉíʹÓõÄ×ÊÔ´
RUSAGE_CHILDERN ËùÓнø³ÌʹÓõÄ×ÊÔ´
RUSAGE_BOSH ±¾ÉíÒÔ¼°ËùÓÐ×Ó½ø³ÌʹÓÃ×ÊÔ´µÄºÍ
º¯ÊýÖ´Ðйý³ÌÖÐrusage½á¹¹Ì彫»á±»Ìîд£¬ÔÚLinuxÖÐÌîдµÄÖ»ÓÐÇ°ÎåÏî
#include <sys/resource.h>
struct rusage{
struct timeval ru_utime; Ö´ÐÐÓû§´úÂëËùÓõÄÈ«²¿Ê±¼ä£¬°üÀ¨ÓÃÀ´ÔËÐÐÓ¦ÓÃÖ¸ÁîµÄʱ¼ä£¬
²»°üÀ¨ÄÚºËÓÃÀ´Íê³ÉÓ¦ÓóÌÐòÇëÇóµÄʱ¼ä
&
Ïà¹ØÎĵµ£º
Í·Îļþ£º
#ifndef _LED_CONFIG_H
#define _LED_CONFIG_H
#define LED_CON 0
#define LED_ON 1
#define LED_OFF 2
#endif
ÄÚºËÏÂÃæµÄÇý¶¯Ä£¿é£º
#include <linux/module.h>
#include <linux/init.h>
#include <linux/io.h>
#include <linux/cdev.h>
#include <linux/fs.h>
......
usb_hcd_omap_probe (const struct hc_driver *driver) (dev/ohci/ohci-omap.c)
ÔÚÄ£¿é³õʼ»¯Ê±±»platform_driver_register()µ÷Óã¬ÓÃÀ´³õʼ»¯Óëohci_hcd_omap_driver
ÏàÆ¥ÅäµÄusbÖ÷¿ØÖÆÆ÷.
->usb_create_hcd(driver); ´´½¨Ò»¸ö´ú±íhost-controllerµÄÊý¾Ý½á¹¹(struct usb_hcd)²¢³õʼ»¯ core/hcd.h
->hcd = kz ......
ÏÖÔÚÔݶ¨µÄѧϰĿ±êΪһ¸öUSBÊó±êµÄÉ豸µ½Ö÷»úµÄ´«Êä¹ý³ÌÈí¼þÉϵĹᴩ(»áÉæ¼°µ½²¿·ÖÓ²¼þ µ«ÊDZ¾È˵ĵçµç·֪ʶÓÐÏÞ Éæ¼°µÄÁ¿²»»á¶à)
ѧϰµÄ¿ò¼ÜÈçÏÂ:
1. USB1.1ÐÒé
A. ¿ØÖÆ´«Êä
B. Öжϴ«Êä
2. &n ......
·½±ãµÄlinuxÃüÁîÊÖ²á
À´Ô´: ChinaUnix²©¿Í ¡¡ÈÕÆÚ£º 2006.07.24 00:31¡¡(¹²ÓÐ0ÌõÆÀÂÛ) ÎÒÒªÆÀÂÛ
NO
·ÖÀà
PS1
ÃüÁîÃû
Ó÷¨¼°²ÎÊý
¹¦ÄÜ×¢½â
¶ÔÓ¦Õ½Ú
1
Îļþ¹ÜÀí
#
ls
ls -a
Áгöµ±Ç°Ä¿Â¼ÏµÄËùÓÐÎļþ£¬°üÀ¨ÒÔ.Í·µÄÒþº¬Îļþ
Îļþ¹ÜÀí
#
ls
ls -l»òll
Áгöµ±Ç°Ä¿Â¼ÏÂÎļþµÄÏêϸР......