Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

LinuxÉ豸ģÐÍÖ®ttyÇý¶¯¼Ü¹¹·ÖÎö


LinuxÉ豸ģÐÍÖ®ttyÇý¶¯¼Ü¹¹·ÖÎö
 
À´Ô´: ChinaUnix²©¿Í ¡¡ÈÕÆÚ£º 2008.07.25 16:24¡¡(¹²ÓÐ0ÌõÆÀÂÛ) ÎÒÒªÆÀÂÛ
 
------------------------------------------
±¾ÎÄϵ±¾Õ¾Ô­´´,»¶Ó­×ªÔØ!
תÔØÇë×¢Ã÷³ö´¦:http://ericxiao.cublog.cn/
------------------------------------------
Ò»£ºÇ°ÑÔ
TtyÕâ¸öÃû³ÆÔ´Óڵ紫´ò×ֽڵļò³Æ¡£ÔÚlinux±íʾ¸÷ÖÖÖնˡ£ÖÕ¶Ëͨ³£¶¼¸úÓ²¼þÏà¶ÔÓ¦¡£±ÈÈç¶ÔÓ¦ÓÚÊäÈëÉ豸¼üÅÌÊó±ê¡£Êä³öÉ豸ÏÔʾÆ÷µÄ¿ØÖÆÖն˺ʹ®¿ÚÖÕ¶Ë.Ò²ÓжÔÓ¦ÓÚ²»´æÔÚÉ豸µÄptyÇý¶¯¡£ÔÚÈç´ËÖÚ¶àµÄÖÕ¶ËÄ£ÐÍÖ®ÖУ¬linuxÊÇÔõô½«ËüÃÇͳһ½¨Ä£µÄÄØ?Õâ¾ÍÊÇÎÒÃǽñÌìÒªÌÖÂÛµÄÎÊÌâ.
¶þ£ºttyÇý¶¯¸Åò
Tty¼Ü¹¹ÈçÏÂËùʾ£º
ÈçÉÏͼËùʾ,Óû§¿Õ¼äÖ÷ÒªÊÇͨ¹ýÉ豸Îļþͬtty_core½»»¥.tty_core¸ù¾ÝÓÿռä²Ù×÷µÄÀàÐÍÔÙÑ¡Ôñ¸úline disciplineºÍtty_driver½»»¥.ÀýÈçÉèÖÃÓ²¼þµÄioctlÖ¸Áî¾ÍÖ±½Ó½»¸øtty_driver´¦Àí¡£ReadºÍwrite²Ù×÷¾Í»á½»¸øline discipline´¦Àí.
Line disciplineÊÇÏß·¹æ³ÌµÄÒâ˼¡£ÕýÈçËüµÄÃû×ÖÒ»Ñù£¬Ëü±íʾµÄÊÇÕâÌõÖն˔Ï߳̔µÄÊäÈëÓëÊä³ö¹æ·¶ÉèÖÃ.Ö÷ÒªÓÃÀ´½øÐÐÊäÈë/Êä³öÊý¾ÝµÄÔ¤´¦Àí¡£´¦ÀíÖ®ºó¡£¾Í»á½«Êý¾Ý½»¸øtty_driver
Tty_driver¾ÍÊÇÖն˶ÔÓ¦µÄÇý¶¯ÁË¡£Ëü½«×Ö·ûת»»³ÉÖն˿ÉÒÔÀí½âµÄ×Ö´®.½«Æä´«¸øÖÕ¶ËÉ豸¡£
ÖµµÃ×¢ÒâµÄÊÇ,Õâ¸ö¼Ü¹¹Ã»ÓÐΪtty_driveroÌṩread²Ù×÷¡£Ò²¾ÍÊÇ˵tty_core ºÍline discipline¶¼Ã»Óа취´Ótty_driverÀïÖ±½Ó¶ÁÖÕ¶ËÐÅÏ¢¡£ÕâÊÇÒòΪtty_driver¶Ô¾ÍµÄhardware²¢²»Ò»¶¨ÊÇÊäÈëÊý¾ÝºÍÊä³öÊý¾ÝµÄ¹²Í¬¸ºÔØÕß¡£ÀýÈç¿ØÖÆÖնˣ¬Êä³öÉ豸ÊÇÏÔʾÆ÷¡£ÊäÈëÉ豸ÊǼüÅÌ¡£»ùÓÚÕâÑùµÄÔ­Àí¡£ÔÚline disciplineÖÐÓÐÒ»¸öÊäÈ뻺´æÇø¡£²¢ÌṩÁËÒ»¸öÃû½Ðreceive_buf()µÄ½Ó¿Úº¯Êý¡£¶ÔÓ¦µÄÖÕ¶ËÉ豸ֻҪµ÷ÓÃline discipineµÄreceiver_bufº¯Êý£¬½«Êý¾ÝдÈëµ½ÊäÈ뻺´æÇø¾Í¿ÉÒÔÁË¡£
Èç¹ûÒ»¸öÉ豸ͬʱÊÇÊäÈëÉ豸ÓÖÊÇÊä³öÉ豸¡£ÄÇÔÚÉ豸µÄÖжϴ¦ÀíÖе÷ÓÃreceive_buf()½«Êý¾ÝдÈë¼´¿É.
Èý£ºttyÇý¶¯½Ó¿Ú·ÖÎö
¾ßÌåµÄttyÇý¶¯Éè¼Æ¿ÉÒԲο¼LDD3¡£ÕâÀïÖ»¶ÔËüµÄ½Ó¿ÚʵÏÖ×öÒ»¸ö·ÖÎö.tty driverµÄËùÓвÙ×÷¶¼°üº¬ÔÚtty_driverÖС£Äں˼´¹©ÁËÒ»¸öÃû½Ðalloc_tty_driver()À´·ÖÅäÕâ¸ötty_driver¡£µ±È»ÎÒÃÇÒ²¿ÉÒÔÔÚ×Ô¼ºµÄÇý¶¯Öн«Ëü¶¨Òå³ÉÒ»¸ö¾²Ì¬µÄ½á¹¹¡£¶Ôtty_driver½øÐÐһЩ±ØÒªµÄ³õʼ»¯Ö®ºó£¬µ÷ÓÃtty_register_driver()½«Æä×¢²á.
alloc_tty_driver()½Ó¿Ú´úÂëÈçÏÂËùʾ£º
struct tty_driver *alloc_tty_driver(int lines)
{
   &


Ïà¹ØÎĵµ£º

ÔÚlinuxÏÂʵÏÖweb qqµÄ×ÀÃ滯


´´½¨×ÀÃæͼ±ê
Ä¿Ç°½«ÍøÂçÓ¦ÓÃÀ©Õ¹µ½×ÀÃæÊÇÒ»¸öÇ÷ÊÆ£¬´æÔÚןܶà½â¾ö·½°¸£¬±¾ÎÄÒÔ Mozilla Prism ΪÀý£¬ÀàËƵķ½·¨Í¬ÑùÊÊÓÃÓÚ Google Chrome ¡£
1. µ½ Mozilla Prism µÄÍøÕ¾ÉÏÏÂÔØ Prism£¬µã»÷ Download Now Ö®ºó»áÌáʾÓÐÁ½ÖÖ£¬Ò»ÖÖÊÇÒÔ Mozilla Firefox À©Õ¹µÄ·½Ê½£¬ÊʺÏÒѾ­°²×°ÓÐ Firefox µÄÅóÓÑ£»Ò»Ö ......

¼òµ¥FTP·þÎñÆ÷µÄ´î½¨£¨linux ¡¢windows£©

linux      ÊÂÇéÒª´ÓSSH˵Æð£¬×ʼÎÒÃÇÔ¶³Ì·ÃÎÊlinux·þÎñÆ÷£¬¶¼ÊÇÓõÄSSH£¬Õâ¸ö¶«Î÷ºÜ·½±ãÁË£¬ÌṩÁËÃüÁîÐУ¬»¹Óд°¿Ú½çÃ棬ÓÃÆðÀ´·½±ã£¬ÏàÐÅÓùýµÄÈ˶¼ÓÐÌå»á£¬µ«Êǵ±ÎÒ»»³ÉflashFXPÁ¬½ÓͬÑùµÄlinux·þÎñÆ÷ʱÔõô¶¼Á¬²»ÉÏ£¬ÕâÏÂÓôÃÆ»µÁË£¬Ôõô°ìÄØ£¿     ÔÚ¾­ÀúÁËÎÞÊý´ÎµÄ³¢ÊÔÖ®ºó£ ......

LINUX C³ÌÐò¿ª·¢Ã¿ÈÕÒ»Ìâ——Ö¸Õë

 
ʵÏÖÒ»¸öÁ´±í£¬Íê³ÉÁ´±íµÄ²åÈ룬²éÕÒ£¬É¾³ý
 
typedef struct _FIFO_M{
  void *pdata;
struct _FIFO_M *pNext;
}FIFO_M,* pFIFO_M;
 
typedef struct _FIFO{
pFIFO_M head;
pFIFO_M tail;
pFIFO_M pos;
int mcount;//½Úµã¸öÊý
int max_count;//½Úµã×î´ó¸öÊý¡£
}FIFO,* pFIFO;
......

LinuxÏÂsambaµÄ°²×°ÓëÅäÖÃ


°²×°samba
ÎÄÕÂÖÐÌáµ½µÄsmaba°²×°³ÌÐò   samba-3.0.20b-1.i386.rpm (ISO)  
1 Ê×ÏÈ£¬ÔÚVMwareÄÚ°Ñsamba°²×°ÎļþµÄ¾µÏñÎļþÓ³ÉäΪ¹âÇý£¬Èçͼ1-1²½Öè1-2-3¡£
 
ͼ1-1
2 È»ºó£¬Ê¹ÓÃÃüÁîmount /dev/cdrom /mnt/cdrom  ×÷ÓÃÊǰѹâÇýÔØÈëµ½Îļþ¼Ð/mnt/cdromÖУ¬Èçͼ1-2 ......

LinuxÄÚºËÈëÃÅ£¨Æߣ©—— ±ØÒªµÄ±àÒë֪ʶ

ËùÓеÄÄں˴úÂ룬»ù±¾¶¼°üº¬ÁËinclude/linux/compile.hÕâ¸öÎļþ£¬ËùÒÔËüÊÇ»ù´¡£¬º­¸ÇÁË·ÖÎöÄÚºËËùÐèÒªµÄһЩÁбàÒë֪ʶ£¬±¾²©¾Í·ÖÎö·ÖÎöÕâ¸öÎļþÀïµÄ´úÂ룺
#ifndef __LINUX_COMPILER_H
#define __LINUX_COMPILER_H
#ifndef __ASSEMBLY__
Ê×ÏÈÓ¡ÈëÑÛÁ±µÄÊǶÔ__ASSEMBLY__Õâ¸öºêµÄÅжϣ¬Õâ¸ö±äÁ¿Êµ¼ÊÊÇÔÚ±àÒë»ã±à´úÂëµÄÊ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ