Linux Kernel API (2.6)
#protect share data
spin_lock/spin_unlock: protect the data during process context(and only at process context), and make sure your code bewteen lock/unlock is fast enough.There may deadlock if the same spin_lock is called at interrupt context.
spin_lock_irq/spin_unlock_irq: call it during interrupt context, make sure the irq is on before calling this function, it will disable irq before accessing share data
spin_lock_irqsave/irqrestore: use at interrupt context, and will save/restort irq registers
The code between spin_lock**/spin_unlock** must not sleep.
The spin_lock** API is defined at include/linux/spinlock_api_up.h for UP architecture.
linux/kernel/spinlock.c is only for SMP.
mutex_lock/mutex_unlock: the similar with down/up, but more efficient
mutex_lock_interruptible: the simlilar with down_interruptiable, can be interruptiable by signal.(like CTRL-C)
the code beween mutex_lock and mutex_unlock can go to sleep
Ïà¹ØÎĵµ£º
ÏÖÏó£ºÓÃSSHÈí¼þÁ¬½Óʱ£¬ÖÐÎÄÊÇÂÒÂë
½â¾ö£º
ÐÞ¸Ä/etc/sysconfig/i18nÎļþ£¬½«Æä¸Ä³ÉÒÔÏÂÄÚÈÝ£º
LANG="zh_CN.GB18030"
LANGUAGE="zh_CN.GB18030:zh_CN.GB2312:zh_CN"
SUPPORTED="zh_CN.UTF-8:zh_CN:zh:en_US.UTF-8:en_US:en"
SYSFONT="latarcyrheb-sun16" ......
¹¹½¨»ù±¾µÄǶÈëʽLinux¸ùÎļþϵͳ
ÆäʵÔÚÈ¥Äê8Ô·ÝÎÒ×öÏµÍ³ÒÆÖ²Ê±¾Í¹¹½¨ºÃÁËÒ»¸ö¿ÉÒÔÓõĸùÎļþϵͳ£¬µ«ÊÇÄÇʱÊǸú×űðÈ˵ġ¶LinuxÈ«ÏßÒÆÖ²Îĵµ¡·×öµÄ¡£ÓÐЩ¶«Î÷ÎÒÒ²²»Çå³þ£¬Ö»ÊǸú×Å×ö£¬×ö³öÀ´ÄÜÓþÍÁËÊÂÁË£¬Ã»ÓÐÉÆäÖеĹ淶£¬ÒÔ¼°ÎļþϵͳÖÐÄÄЩҪ£¬ÄÄЩ²»Òª¡£
³Ã׎ñÄê¹ýÄêµÄ¼¸Ìì¼ÙÆÚ£¬ÎÒÒÆÖ²ÖØÐÂÒÆÖ²ÁËU-Boot1.3.1 ......
ÕªÒª
ÎÒÃÇÔÚÕâÀïÌÖÂÛµÄÊǶÔǶÈëʽlinuxϵͳµÄÆô¶¯¹ý³ÌµÄÊä³öÐÅÏ¢µÄ×¢ÊÍ£¬Í¨¹ýÎÒÃǵÄÌÖÂÛ£¬´ó¼Ò»á¶ÔǶÈëʽlinuxÆô¶¯¹ý³ÌÖгöÏֵġ¢ÒÔǰ¸Ð¾õÊìϤµÄ¡¢µ«È´ÓÖËÆÊǶø·ÇµÄ¶«Î÷ÓÐÒ»¸öÈ·ÇеÄÁ˽⣬²¢ÇÒÄÜÁ˽⵽ÕâЩÊä³öÐÅÏ¢µÄÀ´ÁúÈ¥Âö¡£
ǶÈëʽlinuxµÄÆô¶¯ÐÅÏ¢ÊÇÒ»¸öºÜÖµµÃÎÒÃÇÈ¥ºÃºÃÑо¿µÄ¶«Î÷£¬ËüÄܽ«Ò»·ùËõӰͼ³ÊÏÖÔÚÎÒÃÇÃæÇ°£ ......
2005Äê9ÔÂ22ÈÕ£¬Ç廪ÔÚ¶Á²©Ê¿ÉúÍõÛóÔÚˮľÉçÇøBLOGÉÏ·¢±íÁË¡¶Ç廪ÃεķÛËé--д¸øÇ廪´óѧµÄÍËѧÉêÇë¡·Ã÷È·ÒªÇóÍËѧ, ÒýÆðÉç»á¸÷½ç¹ã·ºÕùÂÛ. Ëû´´×÷µÄ³¤ÆªÎÄÕ¡¶ÍêÈ«ÓÃLinux¹¤×÷¡·, ÑóÑóÁ½Íò¶à×Ö, ´Ó²»Í¬½Ç¶È¾Ó¸ßÁÙϵIJûÊöÁËËûÑÛÖÐLinuxÍêÈ«ÓÅÔ½ÓÚWindowsµÄ¸÷ÖÖÀíÓÉ, ÕâÆªÎÄÕ²¢²»¼òµ¥µÄÊÇһƪÂÛÊö"WindowsÄÜ×öµÄÊÂLinux¶¼Ä ......