Dhiman, Gaurav wrote:
Can anyone tell, what is the function defined in kernel for putting the
process to sleep in exclusive mode (TASK_EXLUSIVE).
Rubini’s book talk about it in chapter 5 (ioctl), but does not tell
which kernel function to call for putting the process to sleep in
exclusive mode.
I tried to search the sources, found “add_wait_queue_exclisive()” but
could not find the function which calls it for putting the process to
sleep in exclusive mode.
If anybody knows, please reply.
I'm in the middle of the same book, so I think what you
are looking for is in kernel/fork.c. See add_wait_queue()
and add_wait_queue_exclusive(). They are essentialy the
same function, but former clears WQ_FLAG_EXCLUSIVE flag
while latter sets it.
include/linux/wait.h defines wait_queue_t struct, where
WQ_FLAG_EXCLUSIVE is defined.
I would say that TASK_EXCLUSIVE was removed in favour of
WQ_FLAG_EXCLUSIVE which now part of the wait queue struct.
I can't find any reference to that in 2.4 bktree, but it
should be found somewhere in Changelogs for 2.4 on
www.kernel.org (After looking myself I couldn't grep it
out though).
Here is also a comment from arch/ia64/sn/kernel/sv.c that
kinda verifies my assumption:
/* XXX FIXME hack hack hack. Our mips64 tree is from before the
switch to WQ_FLAG_EXCLUSIVE, and our ia64 tree is from after it. */
regards,
h
--
hinko <dot> kocevar <at> iskramedical <dot> si
Hinko Kocevar, developer
Iskra Medical d.o.o., Stegne 23, 1k LJ, SLO-EU
"Aì rén" | [Analects XII:22]
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/