.\" Copyright (c) International Business Machines Corp., 2006
.\"
+.\" %%%LICENSE_START(GPLv2+_SW_3_PARA)
.\" This program is free software; you can redistribute it and/or
.\" modify it under the terms of the GNU General Public License as
.\" published by the Free Software Foundation; either version 2 of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
.\" the GNU General Public License for more details.
.\"
-.\" You should have received a copy of the GNU General Public License
-.\" along with this program; if not, write to the Free Software
-.\" Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-.\" MA 02111-1307 USA
+.\" You should have received a copy of the GNU General Public
+.\" License along with this manual; if not, see
+.\" <http://www.gnu.org/licenses/>.
+.\" %%%LICENSE_END
.\"
.\" HISTORY:
.\" 2005-09-28, created by Arnd Bergmann <arndb@de.ibm.com>
.\" 2007-09-28, updates for newer kernels, added example
.\" by Jeremy Kerr <jk@ozlabs.org>
.\"
-.TH SPU_RUN 2 2007-11-25 Linux "Linux Programmer's Manual"
+.TH SPU_RUN 2 2012-08-05 Linux "Linux Programmer's Manual"
.SH NAME
spu_run \- execute an SPU context
.SH SYNOPSIS
.BI "int spu_run(int " fd ", unsigned int *" npc \
", unsigned int *" event ");"
.fi
+
+.IR Note :
+There is no glibc wrapper for this system call; see NOTES.
.SH DESCRIPTION
The
.BR spu_run ()
is meant to be used from libraries that implement a more abstract
interface to SPUs, not to be used from regular applications.
See
-.I http://www.bsc.es/projects/deepcomputing/linuxoncell/
+.UR http://www.bsc.es\:/projects\:/deepcomputing\:/linuxoncell/
+.UE
for the recommended libraries.
.SH EXAMPLE
The following is an example of running a simple, one-instruction SPU
uint32_t instruction, npc;
context = spu_create("/spu/example\-context", 0, 0755);
- if (context == -1)
+ if (context == \-1)
handle_error("spu_create");
/* write a \(aqstop 0x1234\(aq instruction to the SPU\(aqs
instruction = 0x00001234;
fd = open("/spu/example\-context/mem", O_RDWR);
- if (fd == -1)
+ if (fd == \-1)
handle_error("open");
write(fd, &instruction, sizeof(instruction));
npc = 0;
spu_status = spu_run(context, &npc, NULL);
- if (spu_status == -1)
+ if (spu_status == \-1)
handle_error("open");
/* we should see a status code of 0x1234002: