mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bhuvan Kumar MITTAL <bhuvan.mittal@st.com>
To: <linux-kernel@vger.kernel.org>
Cc: "'Bhuvan Kumar MITTAL'" <bhuvan.mittal@st.com>
Subject: Killing a User thread from another User Thread
Date: Tue, 1 May 2007 10:28:29 +0530	[thread overview]
Message-ID: <03f701c78bad$5c589220$142ec70a@dlh.st.com> (raw)

Hi.
I am working on an audio device driver development on Linux (sh4 architecture). I have a userthread which makes ioctl calls to the kernel and once it reaches inside the kernel it waits on a semaphore. It then does some work inside the kernel and continuously keeps looping between the kernel and user space in an endless while loop. 

I want to kill that thread from another user thread while the former is waiting on a semaphore in kernel (which it will never get) coz I want a clean exit of my driver. Please suggest me a way. I did try the use of pthread_cancel, but that is possible only if the target thread is executing in user space and making use of a pthread_testcancel call (with cancelability enabled ofcourse). 

Kindly suggest something.

Regards,

Bhuvan



                 reply	other threads:[~2007-05-01  4:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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='03f701c78bad$5c589220$142ec70a@dlh.st.com' \
    --to=bhuvan.mittal@st.com \
    --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

all inboxes | Powered by JetHome®