Linux 0.12ÄÚºË
LinuxʹÓôÓ1970Äê1ÔÂ1ÈÕ0ʱ0·Ö0ÃëÆ𵽿ª»úʱ¾¹ýµÄÃëÊý×÷Ϊ¿ª»úʱ¼ä, ÊÇÔÚmain.cºÍmktime.cÖнøÐгõʼ»¯µÄ.
1. linux/init/main.c
/*
* read current time from CMOS.
* ·ÃÎÊCMOSÐèҪͨ¹ý¶Ë¿Ú0x70, 0x71½øÐÐ.
* ¶ÁÊý¾Ýʱ,ÏÈÓÃOUTÖ¸ÁîÏò0x70·¢ËÍÒª¶ÁÈ¡×Ö½ÚµÄÆ«ÒÆλÖÃÖµ, È»ºóÓÃINÖ¸Áî´Ó0x71¶ÁÊý¾Ý.
* дÊý¾ÝʱҲһÑù, ÏÈÏò0x70·¢ËÍÆ«ÒÆÖµ, È»ºóÓÃOUTÖ¸ÁîÏò0x71¶Ë¿Ú·¢ËÍÊý¾Ý.
*/
#define CMOS_READ(addr) ({ \
outb_p(0x80|addr,0x70); \
inb_p(0x71); \
})
/*
* CMOS ×Ö½ÚÐÅÏ¢:
* 0x00 - µ±Ç°Ãë. 0x02 - µ±Ç°·Ö. 0x04 - µ±Ç°Ð¡Ê±. 0x06 - Ò»ÖÜÖеĵ±Ç°Ìì.
* 0x07 - Ò»ÔÂÖеĵ±Ç°ÈÕÆÚ. 0x08 - µ±Ç°Ô·Ý. 0x09 - µ±Ç°Äê·Ý
*/
/* ½«È¡µÃµÄBCDÂëת»»ÎªÊýÖµ */
#define BCD_TO_BIN(val) ((val)=((val)&15) + ((val)>>4)*10)
/*
* ³õʼ»¯¿ª»úʱ¼ä, ÓÉmain()µ÷ÓÃ.
*/
static void time_init(void)
{
struct tm time;
do {
time.tm_sec = CMOS_READ(0); /* ¶ÁÈ¡µ±Ç°ÃëÖµ */
time.tm_min = CMOS_READ(2); /* ¶ÁÈ¡µ±Ç°·ÖÖµ */
time.tm_hour = CMOS_READ(4);
time.tm_mday = CMOS_READ(7);
time.tm_mon = CMOS_READ(8); /* ¶ÁÈ¡µ±Ç°ÔÂ·Ý ( 1 - 12) */
time.tm_year = CMOS_READ(9);
} while (time.tm_sec != CMOS_READ(0)); /* Èç¹ûÃëÖµÒѾ·¢Éú±ä»¯¾ÍÖØжÁÒ»±é£¬
&nbs
Ïà¹ØÎĵµ£º
×¼±¸¹¤×÷:
¡¡¡¡Óõ½µÄperl À©Õ¹×é¼þ(modules)ÔÚÉÏƪÌù³ö.( win32::odbc Ä£¿é
)ÏÂÔØ×é¼þºó°´ÕÕReadmeÎļþ°²×°µ¹ÏìӦĿ¼.ÅäÖúÃÏàÓ¦µÄodbcÊý¾ÝÔ´.
¡¡¡¡
¡¡¡¡³ÌÐòʵÏÖ:
¡¡¡¡Ê¹ÓÃ
¡¡¡¡use
Win32::ODBC;
¡¡¡¡
¡¡¡¡Óï¾ä°üº¬Ó¦Ê¹ÓõÄÄ£¿éÊÇwin32::odbc,д³öÊý¾Ý¿â
Á¬½Ó×Ö·û´®
¡¡¡¡
¡¡¡¡$DSN = "DSN =
My DSN ......
linuxÐÞ¸ÄÖ÷»úÃûµÄ·½·¨
ÓÃhostnameÃüÁî¿ÉÒÔÁÙʱÐ޸ĻúÆ÷Ãû£¬µ«»úÆ÷ÖØÐÂÆô¶¯Ö®ºó¾Í»á»Ö¸´ÔÀ´µÄÖµ¡£
#hostname //²é¿´»úÆ÷Ãû
#hostname -i //²é¿´±¾»úÆ÷Ãû¶ÔÓ¦µÄipµØÖ·
ÁíÍâÒ»ÖÖ·½·¨¾ÍÊÇÖ®¾ÃÐÞ¸ÄÅäÖÃÎļþ
ÐÞ¸Ä/etc/sysconfig/network ÐÞ¸ÄÕâ¸öÎļþ£¬ÏµÍ³²ÅÓÐЧ
/etc ......
1 ½Ó¿Ú
ÎÒÃÇÏÈ¿´¿´i915_drv.cÀïÃæÉêÃ÷µÄdriver±äÁ¿£º
static struct drm_driver driver = {
/* don't use mtrr's here, the Xserver or user space app should
* deal with them for intel hardware.
*/
.driver_features =
DRI ......
1. Äں˳õʼ»¯£º
* Äں˽¨Á¢ºÃÄÚºËҳĿ¼ҳ±íÊý¾Ý¿â£¬¼ÙÉèÎïÀíÄÚ´æ´óСΪlen£¬Ôò½¨Á¢ÁË[3G--3G+len]::[0--len]ÕâÑùµÄÐéµØÖ·vaddrºÍÎïÀíµØÖ·paddrµÄÏßÐÔ¶ÔÓ¦¹Øϵ£»
* Äں˽¨Á¢Ò»¸öpageÊý×飬pageÊý×éºÍÎïÀíÒ³ÃæϵÁÐÍêÈ«ÊÇÏßÐÔ¶ÔÓ¦£¬pageÓÃÀ´¹ÜÀí¸ ......
¹ÜµÀÊÇLinuxÖкÜÖØÒªµÄÒ»ÖÖͨÐÅ·½Ê½,ÊÇ°ÑÒ»¸ö³ÌÐòµÄÊä³öÖ±½ÓÁ¬½Óµ½ÁíÒ»¸ö³ÌÐòµÄÊäÈë,³£ËµµÄ¹ÜµÀ¶àÊÇÖ¸ÎÞÃû¹ÜµÀ,ÎÞÃû¹ÜµÀÖ»ÄÜÓÃÓÚ¾ßÓÐÇ×Ôµ¹ØϵµÄ½ø³ÌÖ®¼ä£¬ÕâÊÇËüÓëÓÐÃû¹ÜµÀµÄ×î´óÇø±ð¡£
ÓÐÃû¹ÜµÀ½Ðnamed pipe»òÕßFIFO(ÏȽøÏȳö)£¬¿ÉÒÔÓú¯Êýmkfifo()´´½¨¡£
Linux¹ÜµÀµÄʵÏÖ»úÖÆ
ÔÚLinuxÖУ¬¹ÜµÀÊÇÒ»ÖÖ ......