diff options
author | David Walter Seikel | 2012-01-04 18:41:13 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-01-04 18:41:13 +1000 |
commit | dd7595a3475407a7fa96a97393bae8c5220e8762 (patch) | |
tree | e341e911d7eb911a51684a7412ef7f7c7605d28e /libraries/ecore/src/lib/ecore_psl1ght/spursutil.c | |
parent | Add the skeleton. (diff) | |
download | SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.zip SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.gz SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.bz2 SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.xz |
Add the base Enlightenment Foundation Libraries - eina, eet, evas, ecore, embryo, and edje.
Note that embryo wont be used, but I'm not sure yet if you can build edje without it.
Diffstat (limited to 'libraries/ecore/src/lib/ecore_psl1ght/spursutil.c')
-rw-r--r-- | libraries/ecore/src/lib/ecore_psl1ght/spursutil.c | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/libraries/ecore/src/lib/ecore_psl1ght/spursutil.c b/libraries/ecore/src/lib/ecore_psl1ght/spursutil.c new file mode 100644 index 0000000..27b5c1d --- /dev/null +++ b/libraries/ecore/src/lib/ecore_psl1ght/spursutil.c | |||
@@ -0,0 +1,62 @@ | |||
1 | #include "spursutil.h" | ||
2 | #include <sys/spu.h> | ||
3 | |||
4 | #define SPURS_DEFAULT_PREFIX_NAME "spursutil" | ||
5 | |||
6 | Spurs * | ||
7 | initSpurs(const char *prefix_name) | ||
8 | { | ||
9 | Spurs *spurs = NULL; | ||
10 | SpursAttribute attributeSpurs; | ||
11 | int ret; | ||
12 | int i; | ||
13 | |||
14 | ret = sysSpuInitialize (6, 0); | ||
15 | printf ("sysSpuInitialize return %d\n", ret); | ||
16 | |||
17 | /* initialize spurs */ | ||
18 | printf ("Initializing spurs\n"); | ||
19 | spurs = (void *)memalign (SPURS_ALIGN, sizeof (Spurs)); | ||
20 | printf ("Initializing spurs attribute\n"); | ||
21 | |||
22 | ret = spursAttributeInitialize (&attributeSpurs, 5, 250, 1000, true); | ||
23 | if (ret) | ||
24 | { | ||
25 | printf ("error : spursAttributeInitialize failed %x\n", ret); | ||
26 | goto error; | ||
27 | } | ||
28 | |||
29 | printf ("Setting name prefix\n"); | ||
30 | if (!prefix_name) | ||
31 | prefix_name = SPURS_DEFAULT_PREFIX_NAME; | ||
32 | ret = spursAttributeSetNamePrefix (&attributeSpurs, | ||
33 | prefix_name, strlen (prefix_name)); | ||
34 | if (ret) | ||
35 | { | ||
36 | printf ("error : spursAttributeInitialize failed %x\n", ret); | ||
37 | goto error; | ||
38 | } | ||
39 | |||
40 | printf ("Initializing with attribute\n"); | ||
41 | ret = spursInitializeWithAttribute (spurs, &attributeSpurs); | ||
42 | if (ret) | ||
43 | { | ||
44 | printf ("error: spursInitializeWithAttribute failed %x\n", ret); | ||
45 | goto error; | ||
46 | } | ||
47 | |||
48 | return spurs; | ||
49 | |||
50 | error: | ||
51 | if (spurs) | ||
52 | free (spurs); | ||
53 | return NULL; | ||
54 | } | ||
55 | |||
56 | void | ||
57 | endSpurs(Spurs *spurs) | ||
58 | { | ||
59 | spursFinalize (spurs); | ||
60 | free (spurs); | ||
61 | } | ||
62 | |||