annotate include/TaskManager/base.h @ 311:b09784a9cb09

add smanager interface for test_nogl
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 08 Jun 2009 22:35:44 +0900
parents bcb81858aa62
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
301
bcb81858aa62 remove deprecated source. not work.
tkaito@localhost.localdomain
parents: 193
diff changeset
1 #ifndef INCLUDED_BASE_H_
bcb81858aa62 remove deprecated source. not work.
tkaito@localhost.localdomain
parents: 193
diff changeset
2
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
3 #include <new>
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
4 #include <stdlib.h>
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
5 #include <stdio.h>
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
6
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
7
193
gongo@localhost.localdomain
parents: 161
diff changeset
8 #ifdef __SPU__
gongo@localhost.localdomain
parents: 161
diff changeset
9 //#if 0
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
10 # define BASE_NEW_DELETE(T) \
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
11 /* override new/detele */ \
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
12 static void* operator new(size_t size) { \
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
13 if ((int)size == 0) { \
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
14 size = 1; \
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
15 } \
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
16 \
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
17 void *ptr = malloc(size); \
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
18 return ptr; \
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
19 } \
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
20 static void operator delete(void* rawMemory, size_t size) { \
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
21 free(rawMemory); \
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
22 } \
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
23
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
24 #else
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
25 # define BASE_NEW_DELETE(T)
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
26 #endif
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
27
301
bcb81858aa62 remove deprecated source. not work.
tkaito@localhost.localdomain
parents: 193
diff changeset
28 #endif