diff options
author | Christoph Hellwig <hch@lst.de> | 2007-06-29 10:58:01 +1000 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-07-03 15:24:45 +1000 |
commit | 476273adc7277333aed9963bc4dc9b39066d3038 (patch) | |
tree | c134d69a196296a744e2b1dd4720a490d275d37e /arch/powerpc/platforms/cell/spufs/sched.c | |
parent | 7022543ee404880aab5c641e4983e237815edc35 (diff) | |
download | kernel_samsung_aries-476273adc7277333aed9963bc4dc9b39066d3038.zip kernel_samsung_aries-476273adc7277333aed9963bc4dc9b39066d3038.tar.gz kernel_samsung_aries-476273adc7277333aed9963bc4dc9b39066d3038.tar.bz2 |
[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')
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/sched.c | 7 |
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 4381dd0..5400675 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 |