diff options
author | Bob Nelson <rrnelson@linux.vnet.ibm.com> | 2007-07-20 21:39:52 +0200 |
---|---|---|
committer | Arnd Bergmann <arnd@klappe.arndb.de> | 2007-07-20 21:42:20 +0200 |
commit | 36aaccc1e96481e8310b1d13600096da0f24ff43 (patch) | |
tree | 2726a068ae0d4529ccde030136255abbd1b1e069 /arch/powerpc/platforms/cell/spufs/spufs.h | |
parent | 2414059420311e5384de646eebfd529c184afd3c (diff) |
[CELL] oprofile: enable SPU switch notification to detect currently active SPU tasks
From: Maynard Johnson <mpjohn@us.ibm.com>
This patch adds to the capability of spu_switch_event_register so that
the caller is also notified of currently active SPU tasks.
Exports spu_switch_event_register and spu_switch_event_unregister so
that OProfile can get access to the notifications provided.
Signed-off-by: Maynard Johnson <mpjohn@us.ibm.com>
Signed-off-by: Carl Love <carll@us.ibm.com>
Signed-off-by: Bob Nelson <rrnelson@us.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Acked-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/cell/spufs/spufs.h')
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/spufs.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/spufs.h b/arch/powerpc/platforms/cell/spufs/spufs.h index 42d8da8f0fb..692dbd0edc3 100644 --- a/arch/powerpc/platforms/cell/spufs/spufs.h +++ b/arch/powerpc/platforms/cell/spufs/spufs.h @@ -44,6 +44,11 @@ enum { SPU_SCHED_WAS_ACTIVE, /* was active upon spu_acquire_saved() */ }; +/* ctx->sched_flags */ +enum { + SPU_SCHED_NOTIFY_ACTIVE, +}; + struct spu_context { struct spu *spu; /* pointer to a physical SPU */ struct spu_state csa; /* SPU context save area. */ @@ -240,6 +245,7 @@ void spu_release_saved(struct spu_context *ctx); int spu_activate(struct spu_context *ctx, unsigned long flags); void spu_deactivate(struct spu_context *ctx); void spu_yield(struct spu_context *ctx); +void spu_switch_notify(struct spu *spu, struct spu_context *ctx); void spu_set_timeslice(struct spu_context *ctx); void spu_update_sched_info(struct spu_context *ctx); void __spu_update_sched_info(struct spu_context *ctx); |