RE: kernel threads

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>So one shoudl use kernel threads if you want to do something during
which you can sleep, correct ?(this is what
>you mean by using it in process context and not syscall). So if kernel
threads are the same as a process then
>we can probably add them to a wait_queue and scheule them using
>schedule() ?, we can use wait functions like wait_event_interruptible
on those, right ?


You may want to look at HUB.C for a fairly simple example of a kernel
thread that waits:

http://lxr.linux.no/source/drivers/usb/hub.c#L928

HTH
dom

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux