All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephan von Krawczynski <skraw@ithnet.com>
To: linux-kernel@vger.kernel.org
Subject: How to walk through the tasklist ?
Date: Tue, 24 Apr 2007 14:58:27 +0200	[thread overview]
Message-ID: <20070424145827.467595a6.skraw@ithnet.com> (raw)

Hello all,

can anyone give me a short hint how walking through the tasklist in a device
driver can be achieved nowadays. In ancient pre-20 times you could simply:

    read_lock(&tasklist_lock);
    p=current; 
    do {
        if (p->pid==pid) {  
            read_unlock(&tasklist_lock);
            /* found */
        }
        p=p->next_task;
    } while (p!=current);
    read_unlock(&tasklist_lock);

But since tasklist_lock is gone this is not safe any longer. So, what can I do?


-- 
Regards,
Stephan


             reply	other threads:[~2007-04-24 13:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-24 12:58 Stephan von Krawczynski [this message]
2007-04-24 13:21 ` How to walk through the tasklist ? Jan Engelhardt

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=20070424145827.467595a6.skraw@ithnet.com \
    --to=skraw@ithnet.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.