summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/cell/spu
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-12-11 10:28:45 -0700
committerBrian <brian.paul@tungstengraphics.com>2007-12-11 15:29:05 -0700
commit9828310a1bba1c1c2dffa7ae8866b648e26c2039 (patch)
treed304b435f529ae5a96b463990b8e79fc32816e2a /src/mesa/pipe/cell/spu
parentfda387988c24fad4e0a743f16173dc3c71cbe084 (diff)
Collect some global vars in a single struct.
Diffstat (limited to 'src/mesa/pipe/cell/spu')
-rw-r--r--src/mesa/pipe/cell/spu/main.c17
-rw-r--r--src/mesa/pipe/cell/spu/main.h2
2 files changed, 12 insertions, 7 deletions
diff --git a/src/mesa/pipe/cell/spu/main.c b/src/mesa/pipe/cell/spu/main.c
index 83880bc906..6a77e3e9fa 100644
--- a/src/mesa/pipe/cell/spu/main.c
+++ b/src/mesa/pipe/cell/spu/main.c
@@ -44,7 +44,7 @@ helpful headers:
/opt/ibm/cell-sdk/prototype/sysroot/usr/include/libmisc.h
*/
-struct cell_init_info init;
+volatile struct cell_init_info init;
struct framebuffer fb;
@@ -238,17 +238,21 @@ main_loop(void)
+/**
+ * SPE entrypoint.
+ * Note: example programs declare params as 'unsigned long long' but
+ * that doesn't work.
+ */
int
-main(unsigned long long speid,
- unsigned long long argp,
- unsigned long long envp)
+main(unsigned long speid, unsigned long argp)
{
int tag = 0;
+ (void) speid;
+
DefaultTag = 1;
- (void) speid;
- (void) envp;
+ printf("SPU: main() speid=%lu\n", speid);
mfc_get(&init, /* dest */
(unsigned int) argp, /* src */
@@ -258,6 +262,7 @@ main(unsigned long long speid,
0 /* rid */);
wait_on_mask( 1 << tag );
+
main_loop();
return 0;
diff --git a/src/mesa/pipe/cell/spu/main.h b/src/mesa/pipe/cell/spu/main.h
index 882be7f1c5..8c2796387f 100644
--- a/src/mesa/pipe/cell/spu/main.h
+++ b/src/mesa/pipe/cell/spu/main.h
@@ -34,7 +34,7 @@
#include "pipe/cell/common.h"
-extern struct cell_init_info init;
+extern volatile struct cell_init_info init;
struct framebuffer {
void *start;