From: Schmidt Michal <xschmi00@stud.feec.vutbr.cz>
To: Mockern@yandex.ru
Cc: linux-kernel@vger.kernel.org
Subject: Re: Question: schedule()
Date: Tue, 06 Mar 2007 10:14:13 +0100 [thread overview]
Message-ID: <45ED30E5.9040105@stud.feec.vutbr.cz> (raw)
In-Reply-To: <45ED23E3.000004.17474@webmail18.yandex.ru>
Mockern wrote:
> Hi,
>
> What does schedule() function do? I want to make my kthread preemptive.
It makes a scheduling decision, i.e. it assigns the CPU time to a
suitable runnable task. If called with the current task's state set to
TASK_(UN)INTERRUPTIBLE, it puts the task to sleep.
Kernel threads are preemptible if the kernel is configured with
CONFIG_PREEMPT.
What exactly are you trying to do?
If you're new to Linux kernel programming, I suggest you read Robert
Love's book "Linux Kernel Development".
"Linux Device Drivers" by J.Corbet, A.Rubini and G.Kroah-Hartman will be
very helpful too and it is available online: http://lwn.net/Kernel/LDD3/
Michal
prev parent reply other threads:[~2007-03-06 9:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-06 8:18 Question: schedule() Mockern
2007-03-06 9:13 ` albcamus
2007-03-09 4:39 ` Bill Davidsen
2007-03-06 9:14 ` Schmidt Michal [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=45ED30E5.9040105@stud.feec.vutbr.cz \
--to=xschmi00@stud.feec.vutbr.cz \
--cc=Mockern@yandex.ru \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox