login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
April
»
24
Re: How to walk through the tasklist ?
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From:
Jan Engelhardt <jengelh@...>
To: Stephan von Krawczynski <skraw@...>
Cc: <linux-kernel@...>
Subject:
Re: How to walk through the tasklist ?
Date: Tuesday, April 24, 2007 - 9:21 am
On Apr 24 2007 14:58, Stephan von Krawczynski wrote:
quoted text
>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?
How about for_each_process? Jan -- -
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
Messages in current thread:
How to walk through the tasklist ?
, Stephan von Krawczynski
, (Tue Apr 24, 8:58 am)
Re: How to walk through the tasklist ?
, Jan Engelhardt
, (Tue Apr 24, 9:21 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Hiten Pandya
Re: up? (emacs docbook xml ide)
Tarkan Erimer
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
Greg Kroah-Hartman
[PATCH 005/196] Chinese: add translation of SubmittingDrivers
James Bottomley
Re: [Ksummit-2008-discuss] Fixing the Kernel Janitors project
git
:
linux-netdev
:
Gerrit Renker
[PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side)
David Miller
[GIT]: Networking
Jarek Poplawski
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
12 users
and
767 guests
online.
Online users
strategicplann
catbehaviourdvm
francisyim08dyl
musclebuildies
trainingyourbu
birdbathygjpq
powerpolebuqceh
peluri84
Jeremy
robert009
burnfatnatural
vrayban009
Syndicate