path: root/arch/powerpc/platforms/cell/spufs/sched.c
diff options
authorChristoph Hellwig <hch@lst.de>2007-06-29 10:58:01 +1000
committerPaul Mackerras <paulus@samba.org>2007-07-03 15:24:45 +1000
commit476273adc7277333aed9963bc4dc9b39066d3038 (patch)
treec134d69a196296a744e2b1dd4720a490d275d37e /arch/powerpc/platforms/cell/spufs/sched.c
parent7022543ee404880aab5c641e4983e237815edc35 (diff)
[POWERPC] spufs: Add tid file
The new tid file contains the ID of the thread currently running the context, if any. This is used so that the new spu-top and spu-ps tools can find the thread in /proc. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/cell/spufs/sched.c')
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c
index 4381dd00d231..540067550e88 100644
--- a/arch/powerpc/platforms/cell/spufs/sched.c
+++ b/arch/powerpc/platforms/cell/spufs/sched.c
@@ -102,6 +102,13 @@ void spu_set_timeslice(struct spu_context *ctx)
void __spu_update_sched_info(struct spu_context *ctx)
+ * 32-Bit assignment are atomic on powerpc, and we don't care about
+ * memory ordering here because retriving the controlling thread is
+ * per defintion racy.
+ */
+ ctx->tid = current->pid;
+ /*
* We do our own priority calculations, so we normally want
* ->static_prio to start with. Unfortunately thies field
* contains junk for threads with a realtime scheduling

Privacy Policy