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
Ïà¹ØÎĵµ£º
È«ÎÄÃèÊöÁË´Ówindowx xpϵͳÖУ¬Í¨¹ýÓ²ÅÌÖдæÔÚµÄubuntuµÄiso°²×°Îļþ£¬ Òýµ¼ÏµÍ³Íê³ÉLinuxµÄ°²×°¡£
ÔÀí£º ÉèÖÃϵͳµÄÆô¶¯·½Ê½£¬Í¨¹ýÐÞ¸Äboot.iniÎļþ£¬ÀûÓÃgrub for dos Òýµ¼ÏµÍ³´ÓisoÆô¶¯£¬´Ó¶øË³ÀûÆô¶¯UbuntuµÄ°²×°¡£
(×¢Ò⣺Ubuntu isoÎļþ¿ÉÒÔ²»Óð²×°£¬Ö±½ÓʹÓá£Ï൱ÓÚLive CDÒ»Ñù£¬ Ö»ÊÇ´¦ÀíµÄ½á¹û² ......
inuxµÄchmodÃüÁîʹÓÃÏê½â
ʹÓ÷½Ê½ : chmod [-cfvR] [--help] [--version] mode file...
˵Ã÷ : Linux/Unix µÄµµ°¸´æÈ¡È¨ÏÞ·ÖΪÈý¼¶ : µµ°¸ÓµÓÐÕß¡¢Èº×é¡¢ÆäËû¡£ÀûÓà chmod ¿ÉÒÔ½åÒÔ¿ØÖƵµ°¸ÈçºÎ±»ËûÈËËù´æÈ¡¡£
mode : ȨÏÞÉ趨×Ö´® ......
¡¡ÔÚLinuxϵͳÖУ¬Èç¹ûҪʹÓÃÓ²ÅÌ¡¢¹âÅÌ¡¢ÈíÅÌ»òMOÅ̵ȴ洢É豸£¬±ØÐëÏȽøÐйÒ×°£¨Mount£©¡£µ±´æ´¢É豸¹Ò×°Íê³ÉÖ®ºó£¬¾Í¿ÉÒÔ½«Æä×÷Ϊһ¸öĿ¼À´½øÐзÃÎÊÁË¡£¹Ò×°É豸ÐèҪʹÓÃmountÃüÁî¡£Ö´ÐÐÕâÒ»ÃüÁÖÁÉÙÒªÏÈÈ·¶¨ÏÂÁÐÈýÖÖÐÅÏ¢£º
¡¡¡¡1. Òª¹Ò×°£¨Mount£©¶ÔÏóµÄÎļþϵͳÀàÐÍ£»
¡¡¡¡2. Òª¹Ò×°£¨Mount£©¶ÔÏóµÄÉ豸à ......
ʵÑé4 Linux³ÌÐò¿ª·¢»ù´¡
Ò»¡¢ÊµÑéÄ¿µÄ£º
1. ¼ÌÐøÊìϤLinuxÖÕ¶ËÃüÁ
2. ¼ÌÐøÑ§Ï°Ê¹ÓÃVi±à¼Æ÷£»
3. ѧϰʹÓÃLinux»·¾³ÏÂCÓïÑÔ³ÌÐòµÄ±àÒë¡£
4. µ÷ÊÔÆ÷GdbµÄʹÓÃ
¶þ¡¢ÊµÑéÒªÇó£º
& ......
2005Äê9ÔÂ22ÈÕ£¬Ç廪ÔÚ¶Á²©Ê¿ÉúÍõÛóÔÚˮľÉçÇøBLOGÉÏ·¢±íÁË¡¶Ç廪ÃεķÛËé--д¸øÇ廪´óѧµÄÍËѧÉêÇë¡·Ã÷È·ÒªÇóÍËѧ, ÒýÆðÉç»á¸÷½ç¹ã·ºÕùÂÛ. Ëû´´×÷µÄ³¤ÆªÎÄÕ¡¶ÍêÈ«ÓÃLinux¹¤×÷¡·, ÑóÑóÁ½Íò¶à×Ö, ´Ó²»Í¬½Ç¶È¾Ó¸ßÁÙϵIJûÊöÁËËûÑÛÖÐLinuxÍêÈ«ÓÅÔ½ÓÚWindowsµÄ¸÷ÖÖÀíÓÉ, ÕâÆªÎÄÕ²¢²»¼òµ¥µÄÊÇһƪÂÛÊö"WindowsÄÜ×öµÄÊÂLinux¶¼Ä ......