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

LinuxÖеŤ×÷¶ÓÁÐ(work queue)

¹¤×÷¶ÓÁÐ(work queue)ÊÇLinux kernelÖн«¹¤×÷ÍƺóÖ´ÐеÄÒ»ÖÖ»úÖÆ¡£ÕâÖÖ»úÖƺÍBH(bottom half)»òTasklets²»Í¬Ö®´¦ÔÚÓÚ¹¤×÷¶ÓÁÐÊÇ°ÑÍƺóµÄ¹¤×÷½»ÓÉÒ»¸öÄÚºËÏß³ÌÈ¥Ö´ÐУ¬Òò´Ë¹¤×÷¶ÓÁеÄÓÅÊƾÍÔÚÓÚËüÔÊÐíÖØе÷¶ÈÉõÖÁ˯Ãß¡£
linux 2.6.20ÒԺ󣬹¤×÷¶ÓÁлúÖƺÍ֮ǰµÄ°æ±¾ÓÐÒ»µã²»Í¬£¬ÔÚÍøÉÏÕÒÁËÒ»µã×ÊÁÏ£¬Ò²ÏàÓ¦µÄ¿´ÁËһЩcode£¬ÏÖÔÚ×Ô¼º×ܽáһϣº
Ô­ÎIJο¼£º
http://wiki.365linux.cn/index.php?doc-view-39
http://blog.csdn.net/lanmanck/archive/2009/11/05/4770030.aspx
work queueµÄÍ·Îļþ£º /kernel/include/linux/workqueue.h
work queueµÄÊý¾Ý½á¹¹£º
struct work_struct {
    atomic_long_t data;
#define WORK_STRUCT_PENDING 0                  /* T if work item pending execution */
#define WORK_STRUCT_FLAG_MASK                 (3UL)
#define WORK_STRUCT_WQ_DATA_MASK         (~WORK_STRUCT_FLAG_MASK)
    struct list_head entry;
    work_func_t func;
#ifdef CONFIG_LOCKDEP
    struct lockdep_map lockdep_map;
#endif
};
ÆäÖÐ work_func_t µÄ¶¨ÒåÈçÏ£º
typedef void (*work_func_t)(struct work_struct *work);
work queue Ö÷ÒªµÄ API£º
INIT_WORK(struct work_struct *work, work_func_t func)
INIT_DELAYED_WORK(struct delayed_work *work, work_func_t func)
int schedule_work(struct work_struct *work)
void flush_scheduled_work(void)
int schedule_delayed_work(struct delayed_work *work, unsigned long delay)
int cancel_delayed_work(struct delayed_work *work)
struct workqueue_struct *create_workqueue(const char *name)
int queue_work(struct workqueue_struct *wq, struct work_struct *work)
int queue_delayed_work(struct workqueue_struct *wq, struct delayed_work *work, unsigned long delay)
void flush_workqueue(struct workqueue_struct *wq)
void destroy_workqueue(struct workqueue_struct *wq)
work queue µÄʹÓÃʵÀý£º
struct my_work_t {
    ch


Ïà¹ØÎĵµ£º

[תÌû]LinuxÇý¶¯¿ª·¢Ñ§Ï°µÄһЩ±ØÒª²½Öè

 1. ѧ»áд¼òµ¥µÄmakefile
2. ±àһЩӦÓÃ
³ÌÐò
£¬¿ÉÒÔÓÃmakefileÅÜÆðÀ´
3. ѧ»áдÇý¶¯
µÄmakefile
4. дһ¼òµ¥charÇý¶¯£¬makefile±àÒëͨ¹ý£¬¿ÉÒÔinsmod£¬ lsmod£¬ rmmod. ÔÚÇý¶¯µÄinitº¯ÊýÀï´òÓ¡hello world£¬insmodºóÓ¦¸ÃÄܹ»Í¨¹ýdmesg¿´µ½Êä³ö
¡£
5. дһÍêÕûÇý¶¯£¬ ¼ÓÉÏread£¬ write£¬ ioctl£¬ pollingµÈ¸ ......

linuxÏÂgcc±àÒësinº¯Êý³ö´íµÄÎÊÌâ

 
Q:
I
keep getting
errors due to library functions being undefined,
but I'm #including all
the right header files.
A:
In the general case of calling code in an
external library,
using #include
to pull in
the right header file(s) is only half
of the story; you also have to tell th ......

LinuxÖÐÎļþµÄѹËõÓë½âѹËõ

 
Form: http://tech.sina.com.cn/c/4082.html
LinuxÖÐÎļþµÄѹËõÓë½âѹËõ
http://www.sina.com.cn 2001/06/28 14:15 ÈüµÏÍø Àî¸ïÐÂ
 
¡¡¡¡¶ÔÐí¶àÓû§À´Ëµ£¬ÔÚDOSºÍWindows»·¾³ÏÂÀûÓù¤¾ßÈí¼þARJ¡¢WinzipµÈ£¬Ñ¹Ëõ»ò½âѹÎļþÊDZȽÏÈÝÒ×µÄÊ¡£µ«ÊÇ£¬ÔÚLinuxÖÐÈçºÎ¶ÔÎļþ½øÐÐѹËõÓë½âѹÄØ£¿±¾ÎÄ»ùÓÚRed Ha ......

VM+linuxÍøÂçÉèÖÃ


VM-Linux-ÈçºÎÅäÖÃÍøÂç(2009-07-26 03:01:29)
±êÇ©£ºvm ÅäÖÃÍøÂç linux it 
·ÖÀࣺIT
ÅäÖÃÐéÄâ»úµÄÍøÂç
¡¡¡¡¹âÓÐÐéÄâ»úÊDz»¹»µÄ£¬ÎÒÃÇÐèҪʹÓÃÐéÄâ»úºÍÕæʵÖ÷»úÒÔ¼°ÆäËûµÄÐéÄâ»ú½øÐÐͨѶ¡£Í¨Ñ¶·ÖÁ½¸ö²¿·Ö£¬Ò»¸öÊǾÖÓòÍøÄڵģ¬ÁíÒ»¸öÊÇÁ¬½Óµ½¹«ÍøµÄ¡£ÕâÒ»²¿·ÖÊÇÖص㣬ÈýÖÖ²»Í¬Ä£Ê½µÄÓÃ;¾ÍÒª½ÒÏþ ......

linux+ngnix+php °²×°ÅäÖÃ

 Èí¼þÏÂÔصØÖ·£º
pcre£ºhttp://www.pcre.org/ 
Nginx£ºhttp://nginx.net/
spawn-fcig: http://redmine.lighttpd.net/projects/spawn-fcgi/news
ÀûÓà wget ÃüÁîÏÂÔØÏàÓ¦µÄ °²×°°ü
²½Öè
1¡¢°²×°pcre
     ngnix ÐèÒª°²×°pcre¿â£º
    wget http://sourceforge.net ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ