>Is  tsignal(kthread_t *t, int sig) from  uts/common/os/sig.c file
> able to do it?
>
>
>In my example:
>kthread_t *pTId = thread_create( ......);
>tsignal(pTId ,SIGILL);
>
>but the kthread is still live on .


I think I explained that you CANNOT kill kernel threads; there's no point
in trying to find interfaces which do because there aren't any.

All the signal function which send SIGxxx signals are only usable for
threads which belong to a process; such signals also require cooperation
from the thread receiving the signal (that is, code in the kernel must
handle the signal or nothing will happen)

I'm not sure why you want to kill your kernel threads; but the only way to
do so is to define a method which you can use to tell the thread to
terminate; and then the thread will need to terminate on its own accord.

The reasons for this as manifold: the most important one being that a 
thread may hold locks and may be in the process of updating datastructures
and those might be inconsistent.  Killing a thread in such circumstances
will surely lead to a deadlock or panic later on.

Casper

_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to