Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions | Variables
context.c File Reference
#include <linux/fs.h>
#include <linux/mm.h>
#include <linux/slab.h>
#include <linux/atomic.h>
#include <linux/sched.h>
#include <asm/spu.h>
#include <asm/spu_csa.h>
#include "spufs.h"
#include "sputrace.h"

Go to the source code of this file.


struct spu_contextalloc_spu_context (struct spu_gang *gang)
void destroy_spu_context (struct kref *kref)
struct spu_contextget_spu_context (struct spu_context *ctx)
int put_spu_context (struct spu_context *ctx)
void spu_forget (struct spu_context *ctx)
void spu_unmap_mappings (struct spu_context *ctx)
int spu_acquire_saved (struct spu_context *ctx)
void spu_release_saved (struct spu_context *ctx)


atomic_t nr_spu_contexts = ATOMIC_INIT(0)

Function Documentation

struct spu_context* alloc_spu_context ( struct spu_gang gang)

Definition at line 36 of file context.c.

void destroy_spu_context ( struct kref kref)

Definition at line 82 of file context.c.

struct spu_context* get_spu_context ( struct spu_context ctx)

Definition at line 101 of file context.c.

int put_spu_context ( struct spu_context ctx)

Definition at line 107 of file context.c.

int spu_acquire_saved ( struct spu_context ctx)

spu_acquire_saved - lock spu contex and make sure it is in saved state : spu contex to lock

Definition at line 156 of file context.c.

void spu_forget ( struct spu_context ctx)

Definition at line 113 of file context.c.

void spu_release_saved ( struct spu_context ctx)

spu_release_saved - unlock spu context and return it to the runqueue : context to unlock

Definition at line 178 of file context.c.

void spu_unmap_mappings ( struct spu_context ctx)

Definition at line 132 of file context.c.

Variable Documentation

atomic_t nr_spu_contexts = ATOMIC_INIT(0)

Definition at line 34 of file context.c.