cvs commit: src/sys/kern kern_sig.c
Simon 'corecode' Schubert
corecode at fs.ei.tum.de
Thu Feb 22 10:52:40 PST 2007
Matthew Dillon wrote:
:corecode 2007/02/22 07:48:55 PST
:DragonFly src repository
: Modified files:
: sys/kern kern_sig.c
: Fix stopping of the current process, which was broken by the last commit.
: If the current process is still far inside the kernel and is going to
: tsleep(), CURSIG()/issignal() in tsleep() have to see the pending signal;
You can't actually stop a process in tsleep, ever. The kernel might
be holding resources (such as lockmgr locks) that would never be
A process can only be stopped in userret() (platform/pc32/i386/trap.c).
Please make sure that those semantics are retained.
That always happened. CURSIG/issignal check for a SA_STOP signal and calls tstop, which in turn calls tsleep() in a loop until SSTOP (previously P_STOPPED) is cleared.
I'm also not fond of this, but seems the kernel code assumes this behaviour. I noticed this in ttread(): it calls ttysleep()/tsleep(), but really expects the thread to be stopped *inside*.
I'd rather have the threads stop only in userret() as well (and possibly when entering the kernel), but we'd need very careful audit of CURSIG/issignal() users.
Serve - BSD +++ RENT this banner advert +++ ASCII Ribbon /"\
Work - Mac +++ space for low â¬â¬â¬ NOW!1 +++ Campaign \ /
Party Enjoy Relax | http://dragonflybsd.org Against HTML \
Dude 2c 2 the max ! http://golden-apple.biz Mail + News / \
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 252 bytes
Desc: "Description: OpenPGP digital signature"
More information about the Commits