How to kill a thread among several threads belongs to a process?

I would like to know is there any we can kill a single thread among multiple threads belongs to process?

Since Signal action is process wise not per thread, i strongly feel that we can not or for that mater from external sources as well single thread can not be killed which is critical section and holding mutex.

I got confused after seeing pthread_mutexattr_setrobust() posix thread api.

Which will be used for creating robust mutex to get help when the owner get killed suddenly before release the mutex.

Thanks
--Murali :b:

kill is to a process and to a thread spawned within the context of a process, should be controlled by that process if the signals/control are being triggered externally with respect to the process. You know the thread that needs to receive action, bind the external signal to the process then the process needs to map the action to its specific thread from the thread stack.

It isn't clear whether you're asking for a way for one thread in a process to send a signal to another thread in the same process (which can be done with pthread_kill()), or to send a signal from an external process to a particular thread in another process (which cannot be done unless the process containing the thread to be signaled provides an interface to allow that to happen).