LinuxÉ豸Çý¶¯³ÌÐòѧϰ֮Êý¾ÝÀàÐÍÓëÄÚ´æ·ÖÅä
LinuxÉ豸Çý¶¯³ÌÐòѧϰ±Ê¼ÇϵÁÐÎÄÕÂÔ×÷ÕßÊÇ£ºTekkaman Ninja£¬Ëû²©¿ÍµØÖ·£º
http://blog.chinaunix.net/u1/34474/showart_404278.html
ÔÚ´ËÏòTekkaman Ninja±íʾ¸Ðл£¬Ð´³öÕâôºÃµÄÎÄÕ£¬Ê¹ÎÒÉÙ×ßÁ˺ܶàÍä·¡£
ÓÉÓÚÇ°ÃæµÄѧϰÖÐÓÐÓõ½ µÚʮһÕ ÄÚºËÊý¾Ý½á¹¹ÀàÐÍ µÄ֪ʶ£¬ËùÒÔÎÒÏÈ¿´ÁË¡£ÒªµãÈçÏ£º
½«linux ÒÆÖ²µ½ÐµÄÌåϵ½á¹¹Ê±£¬¿ª·¢ÕßÓöµ½µÄÈô¸ÉÎÊÌⶼÓë²»ÕýÈ·µÄÊý¾ÝÀàÐÍÓйء£¼á³ÖʹÓÃÑϸñµÄÊý¾ÝÀàÐͺÍʹÓà -Wall -Wstrict-prototypes ½øÐбàÒë¿ÉÄܱÜÃâ´ó²¿·ÖµÄ bug¡£
ÄÚºËÊý¾ÝʹÓõÄÊý¾ÝÀàÐÍÖ÷Òª·ÖΪ 3 ¸öÀàÐÍ: ±ê×¼ C ÓïÑÔÀàÐÍ¡¢È·¶¨´óСµÄÀàÐͺÍÌض¨Äں˶ÔÏóµÄÀàÐÍ¡£
±ê×¼ C ÓïÑÔÀàÐÍ
µ±ÐèÒª“Ò»¸ö2×Ö½ÚÌî³ä·û”»ò“ÓÃÒ»¸ö4×Ö½Ú×Ö´®À´´ú±íij¸ö¶«Î÷”£¬¾Í²»ÄÜʹÓñê×¼CÓïÑÔÀàÐÍ£¬ÒòΪÔÚ²»Í¬µÄÌåϵ½á¹¹£¬C ÓïÑÔµÄÊý¾ÝÀàÐÍËùÕ¼µÄ¿Õ¼ä´óС²»Í¬¡£ºóÃæµÄdatasize ³ÌÐòʵÑéչʾÁËÓû§¿Õ¼ä¸÷ÖÖ C µÄÊý¾ÝÀàÐÍÔÚµ±Ç°Æ½Ì¨ËùÕ¼¿Õ¼äµÄ´óС¡£¶øÇÒÓеĹ¹¼Ü£¬Äں˿ռäºÍÓû§¿Õ¼äµÄC Êý¾ÝÀàÐÍËùÕ¼¿Õ¼ä´óСҲ¿ÉÄܲ»Í¬¡£kdatasizeÄ£¿éÏÔʾÁ˵±Ç°Ä£¿éµÄÄں˿ռäC Êý¾ÝÀàÐÍËùÕ¼¿Õ¼ä´óС¡£
¾¡¹Ü¸ÅÄîÉϵØÖ·ÊÇÖ¸Õ룬µ«Ê¹ÓÃÒ»¸öÎÞ·ûºÅÕûÐÍ¿ÉÒÔ¸üºÃµØʵÏÖÄÚ´æ¹ÜÀí; Äں˰ÑÎïÀíÄÚ´æ¿´³ÉÒ»¸ö¾ÞÐÍÊý×é, ÄÚ´æµØÖ·¾ÍÊǸÃÊý×éµÄË÷Òý¡£ ÎÒÃÇ¿ÉÒÔ·½±ãµØ¶ÔÖ¸ÕëÈ¡Öµ£¬µ«Ö±½Ó´¦ÀíÄÚ´æµØַʱ£¬ÎÒÃǼ¸ºõ´Ó²»»áÒÔÕâÖÖ·½Ê½¶ÔËûÈ¡Öµ¡£Ê¹ÓÃÒ»¸öÕûÊýÀàÐͱÜÃâÁËÕâÖÖÈ¡Öµ£¬Òò´Ë±ÜÃâÁË bug¡£ËùÒÔ£¬ÀûÓÃÖÁÉÙÔÚ Linux Ä¿Ç°Ö§³ÖµÄËùÓÐƽ̨ÉÏ£¬Ö¸ÕëºÍ³¤ÕûÐÍʼÖÕÊÇÏàͬ´óСµÄÕâÒ»ÊÂʵ£¬ÄÚºËÖÐÄÚ´æµØÖ·³£³£ÊÇ unsigned long¡£
C99 ±ê×¼¶¨ÒåÁË intptr_t ºÍ uintptr_t ÀàÐÍ£¬ËüÃÇÊÇÄܹ»±£´æÖ¸ÕëÖµµÄÕûÐͱäÁ¿¡£µ«Ã»ÔÚ 2.6 ÄÚºËÖм¸ºõûʹÓá£
È·¶¨´óСµÄÀàÐÍ
µ±ÐèÒªÖªµÀÄ㶨ÒåµÄÊý¾ÝµÄ´óСʱ£¬¿ÉÒÔʹÓÃÄÚºËÌṩµÄÏÂÁÐÊý¾ÝÀàÐÍ£¨ËùÓеÄÊý¾ÝÉùÃ÷ÔÚ <asm/types.h>, ±»°üº¬ÔÚ <linux/types.h> £©£º
u8; /* unsigned byte (8 bits) */
u16; /* unsigned word (16 bits) */
u32; /* unsigned 32-bit value */
u64; /* unsigned 64-bit value */
/*ËäÈ»ºÜÉÙÐèÒªÓзûºÅÀàÐÍ£¬µ«ÊÇÈç¹ûÐèÒª£¬Ö»ÒªÓà s ´úÌæ u*/
ÈôÒ»¸öÓû§¿Õ¼ä³ÌÐòÐèҪʹÓÃÕâЩÀàÐÍ£¬¿ÉÔÚ·ûºÅÇ°¼ÓÒ»¸öË«Ï»®Ïß: __u8ºÍÆäËüÀàÐÍÊǶÀÁ¢ÓÚ __KERNEL__ ¶¨ÒåµÄ¡£
ÕâЩÀàÐÍÊÇ Linux Ìض¨µÄ£¬ËüÃÇ·Á°ÁËÒÆÖ²Èí¼þµ½ÆäËûµÄ Unix »úÆ÷¡£ÐµıàÒëÆ÷ϵͳ֧³Ö C99-±ê×¼ ÀàÐÍ£¬Èç uint8_t ºÍ uint32_t¡
Ïà¹ØÎĵµ£º
Ò», °²×° unixODBC
ÏÂÔØ°²×°°ü. ÔÚ RedHat °²×°¹âÅÌÉϾÍÓÐ
unixODBC-2.2.11-1.RHEL4.1.i386.rpm
unixODBC-devel-2.2.11-1.RHEL4.1.i386.rpm
unixODBC-kde-2.2.11-1.RHEL4.1.i386.rpm
°²×°
rpm -Uvh unixODBC-2.2.11-1.RHEL4.1.i386.rpm
rpm -Uvh unixODBC-devel-2.2.11-1.RHEL4.1.i386.rpm
Èç¹û°²×°ÖÐÌáʾÓжÔÆäË ......
Ê×ÏÈPerl mkdir µÄÓï·¨ÊÇ£º
1.mkdir('dir', ´ú±í¾Åλ¶þ½øÖÆÊý×ÖµÄÊ®½øÖÆÖµ)
ÉèÖÃ775£¬Ôò¸ÃֵΪʮ½øÖƵÄ509£¬¼´¶þ½øÖƵÄ111111101
´ËÊýÖµ²»ÄÜÉèÖÃΪ111111111¼´Ê®½øÖƵÄ511¼´777¡£
2.mkdir('dir', 0³£¼ûunix3λȨÏÞ)
¿ÉÒÔÉèÖÃ777¡£
È»ºóÔÚlinuxÏÂʱ£¬ÓÉÓÚumaskµÄÔÒò£¬Ö»ÄÜÉèÖÃΪ755¡£
ÒòΪ´´½¨ÎļþʱµÄȨÏÞÊÇumaskºÍ ......
Ê×ÏÈ£¬ÅäÖÃRedBootµÄIP¼°Æätftp·þÎñÆ÷IP£¬×°ºÃtftp·þÎñÆ÷£¬ÐèÒªÏÂÔصÄÄں˼°ÄÚ´æ¾µÏóÓ¦·ÅÔÚ·þÎñÆ÷µÄ/tftpbootĿ¼ÏÂ
ÅäÖÃRedBootµÄÖ¸ÁîÊÇ
> fconfig
×¢Ò⣺Æô¶¯µÄÑÓʱ²»ÒªÉèΪ0£¬·ñÔòÒÔºó¾ÍºÜÄÑÔÙ¸ü¸ÄϵͳÁË
È»ºóÒªÖ´ÐÐflash´æ´¢Æ÷µÄ³õʼ»¯¹¤×÷£º
> fis init
Ö®ºó£¬½«kernelÓëramdisk.gzͨ¹ýtftpÏÂÔØÖÁÄڴ沢д ......
Linux»·¾³½ø³Ì¼äͨÐÅ£¨Ò»£©
http://www.ibm.com/developerworks/cn/linux/l-ipc/part1/
Linux»·¾³½ø³Ì¼äͨÐÅ£¨¶þ£©ÉÏ
http://www.ibm.com/developerworks/cn/linux/l-ipc/part2/index1.html
Linux»·¾³½ø³Ì¼äͨÐÅ£¨¶þ£©ÏÂ
http://www.ibm.com/developerworks/cn/linux/l-ipc/part2/index2.html
Linux»·¾³½ø³Ì¼äͨÐÅ£ ......
½ñÌìÓÖѧÁË»·¾³±äÁ¿µÄÉèÖ㬸ÐÊܱȽÏÉîһЩ£¬Ê×ÏÈ°ÑÎÒ´ÓÍøÉÏ¿´µ½µÄÖªµÀºÍ´ó¼Ò·ÖÏíһϡ£
»·¾³±äÁ¿ÊǺÍShell½ôÃÜÏà¹ØµÄ£¬Óû§µÇ ¼ϵͳºó¾ÍÆô¶¯ÁËÒ»¸öShell¡£¶ÔÓÚLinuxÀ´ËµÒ»°ãÊÇbash£¬µ«Ò²¿ÉÒÔÖØÐÂÉ趨»òÇл»µ½ÆäËüµÄ Shell¡£¶ÔÓÚUNIX£¬¿ÉÄÜÊÇCShelll¡£»·¾³±äÁ¿ÊÇͨ¹ýShellÃüÁîÀ´ÉèÖõģ¬ÉèÖúõĻ·¾³±äÁ¿ÓÖ¿ÉÒÔ±»ËùÓе±Ç° ......