aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuji Mano <yuji.mano@am.sony.com>2009-02-11 11:43:10 -0800
committerYuji Mano <yuji.mano@am.sony.com>2009-02-11 11:43:10 -0800
commit28f47de90524798b32930a54cec1e8576ba851bc (patch)
tree90858a53f48ae48ecc34f94c83402ffc0f5223b2
parent28a8d5ac0b7758e07e28638fc763d2639647ba4f (diff)
downloadmars-src-28f47de90524798b32930a54cec1e8576ba851bc.tar.gz
samples: Partial context save compatibility
Signed-off-by: Yuji Mano <yuji.mano@am.sony.com>
-rw-r--r--samples/barrier/host.c2
-rw-r--r--samples/compare/host.c2
-rw-r--r--samples/event_flag/host.c4
-rw-r--r--samples/exit_code/host.c4
-rw-r--r--samples/grayscale/host.c4
-rw-r--r--samples/hello/host.c2
-rw-r--r--samples/mandelbrot/host.c4
-rw-r--r--samples/mutex/host.c2
-rw-r--r--samples/priority/host.c2
-rw-r--r--samples/queue/host.c4
-rw-r--r--samples/schedule/host.c4
-rw-r--r--samples/semaphore/host.c2
-rw-r--r--samples/shared_context/host.c2
-rw-r--r--samples/signal/host.c4
-rw-r--r--samples/yield/host.c4
15 files changed, 23 insertions, 23 deletions
diff --git a/samples/barrier/host.c b/samples/barrier/host.c
index f75b530..1bad744 100644
--- a/samples/barrier/host.c
+++ b/samples/barrier/host.c
@@ -68,7 +68,7 @@ int main(void)
snprintf(name, MARS_TASK_NAME_LEN_MAX, "Task %d", i + 1);
ret = mars_task_create(mars_ctx, &task_id[i], name,
- mpu_task_prog.elf_image, MARS_TASK_CONTEXT_SAVE_ALL);
+ mpu_task_prog.elf_image, MARS_TASK_CONTEXT_SAVE_SIZE_MAX);
if (ret) {
printf("MARS task create failed! (%d)\n", ret);
return 1;
diff --git a/samples/compare/host.c b/samples/compare/host.c
index 20cf946..1080353 100644
--- a/samples/compare/host.c
+++ b/samples/compare/host.c
@@ -152,7 +152,7 @@ static int libmars(int task, int loop)
for (i = 0; i < task; i++) {
sprintf((char *)&name[i], "libmars Task %d", i);
ret = mars_task_create(mars_ctx, &task_id[i], name[i],
- mpu_task_libmars_prog.elf_image, NULL);
+ mpu_task_libmars_prog.elf_image, 0);
if (ret)
return -1;
diff --git a/samples/event_flag/host.c b/samples/event_flag/host.c
index 4de700a..dcecfb9 100644
--- a/samples/event_flag/host.c
+++ b/samples/event_flag/host.c
@@ -99,14 +99,14 @@ int main(void)
}
ret = mars_task_create(mars_ctx, &task1_id, "Task 1",
- mpu_task1_prog.elf_image, MARS_TASK_CONTEXT_SAVE_ALL);
+ mpu_task1_prog.elf_image, MARS_TASK_CONTEXT_SAVE_SIZE_MAX);
if (ret) {
printf("MARS task 1 create failed! (%d)\n", ret);
return 1;
}
ret = mars_task_create(mars_ctx, &task2_id, "Task 2",
- mpu_task2_prog.elf_image, MARS_TASK_CONTEXT_SAVE_ALL);
+ mpu_task2_prog.elf_image, MARS_TASK_CONTEXT_SAVE_SIZE_MAX);
if (ret) {
printf("MARS task 1 create failed! (%d)\n", ret);
return 1;
diff --git a/samples/exit_code/host.c b/samples/exit_code/host.c
index 194e5e7..ae6fa76 100644
--- a/samples/exit_code/host.c
+++ b/samples/exit_code/host.c
@@ -67,7 +67,7 @@ int main(void)
}
ret = mars_task_create(mars_ctx, &task1_id, "Task 1",
- mpu_task1_prog.elf_image, MARS_TASK_CONTEXT_SAVE_ALL);
+ mpu_task1_prog.elf_image, MARS_TASK_CONTEXT_SAVE_SIZE_MAX);
if (ret) {
printf("MARS task 1 create failed! (%d)\n", ret);
return 1;
@@ -78,7 +78,7 @@ int main(void)
snprintf(name, MARS_TASK_NAME_LEN_MAX, "Task 2.%d", i);
ret = mars_task_create(mars_ctx, &task2_id[i], name,
- mpu_task2_prog.elf_image, NULL);
+ mpu_task2_prog.elf_image, 0);
if (ret) {
printf("MARS task 2 create failed! (%d)\n", ret);
return 1;
diff --git a/samples/grayscale/host.c b/samples/grayscale/host.c
index c97ccff..1e5d286 100644
--- a/samples/grayscale/host.c
+++ b/samples/grayscale/host.c
@@ -121,7 +121,7 @@ void rgb2y(unsigned char *src, unsigned char *dst, int num)
}
ret = mars_task_create(mars_ctx, &task1_id, "Grayscale Main Task",
- mpu_task1_prog.elf_image, MARS_TASK_CONTEXT_SAVE_ALL);
+ mpu_task1_prog.elf_image, MARS_TASK_CONTEXT_SAVE_SIZE_MAX);
if (ret) {
printf("MARS task 1 create failed! (%d)\n", ret);
exit(1);
@@ -130,7 +130,7 @@ void rgb2y(unsigned char *src, unsigned char *dst, int num)
for (i = 0; i < NUM_TASKS; i++) {
ret = mars_task_create(mars_ctx, &task2_id[i],
"Grayscale Sub Task", mpu_task2_prog.elf_image,
- MARS_TASK_CONTEXT_SAVE_ALL);
+ MARS_TASK_CONTEXT_SAVE_SIZE_MAX);
if (ret) {
printf("MARS task 2 create failed! (%d)\n", ret);
exit(1);
diff --git a/samples/hello/host.c b/samples/hello/host.c
index 34033bd..c9d8ddb 100644
--- a/samples/hello/host.c
+++ b/samples/hello/host.c
@@ -51,7 +51,7 @@ int main(void)
}
ret = mars_task_create(mars_ctx, &task_id, "Task",
- mpu_task_prog.elf_image, NULL);
+ mpu_task_prog.elf_image, 0);
if (ret) {
printf("MARS task create failed! (%d)\n", ret);
return 1;
diff --git a/samples/mandelbrot/host.c b/samples/mandelbrot/host.c
index 83610d4..cc3f03f 100644
--- a/samples/mandelbrot/host.c
+++ b/samples/mandelbrot/host.c
@@ -395,7 +395,7 @@ int main(void)
for (i = 0; i < NUM_TASKS; i++) {
ret = mars_task_create(mars_ctx, &mandelbrot_task_id[i],
- "mandelbrot", mpu_mandelbrot_prog.elf_image, NULL);
+ "mandelbrot", mpu_mandelbrot_prog.elf_image, 0);
if (ret) {
printf("MARS task create failed! (%d)\n", ret);
return 1;
@@ -404,7 +404,7 @@ int main(void)
for (i = 0; i < NUM_TASKS; i++) {
ret = mars_task_create(mars_ctx, &grayscale_task_id[i],
- "grayscale", mpu_grayscale_prog.elf_image, NULL);
+ "grayscale", mpu_grayscale_prog.elf_image, 0);
if (ret) {
printf("MARS task create failed! (%d)\n", ret);
return 1;
diff --git a/samples/mutex/host.c b/samples/mutex/host.c
index 562600d..ac08e8a 100644
--- a/samples/mutex/host.c
+++ b/samples/mutex/host.c
@@ -108,7 +108,7 @@ int main(void)
snprintf(name, MARS_TASK_NAME_LEN_MAX, "Task %d", i);
ret = mars_task_create(mars_ctx, &task_id[i], name,
- mpu_task_prog.elf_image, NULL);
+ mpu_task_prog.elf_image, 0);
if (ret) {
printf("MARS task create failed! (%d)\n", ret);
return 1;
diff --git a/samples/priority/host.c b/samples/priority/host.c
index f2826ba..9819ec9 100644
--- a/samples/priority/host.c
+++ b/samples/priority/host.c
@@ -69,7 +69,7 @@ int main(void)
"Task %d", i * NUM_TASKS_PER_PRIO + j);
ret = mars_task_create(mars_ctx,
&task_id[i * NUM_TASKS_PER_PRIO + j],
- name, mpu_task_prog.elf_image, NULL);
+ name, mpu_task_prog.elf_image, 0);
if (ret) {
printf("MARS task create failed! (%d)\n", ret);
return 1;
diff --git a/samples/queue/host.c b/samples/queue/host.c
index cb99673..d8cbff2 100644
--- a/samples/queue/host.c
+++ b/samples/queue/host.c
@@ -120,7 +120,7 @@ int main(void)
snprintf(name, MARS_TASK_NAME_LEN_MAX, "Task 1.%d", i + 1);
ret = mars_task_create(mars_ctx, &task1_id[i], name,
- mpu_task1_prog.elf_image, MARS_TASK_CONTEXT_SAVE_ALL);
+ mpu_task1_prog.elf_image, MARS_TASK_CONTEXT_SAVE_SIZE_MAX);
if (ret) {
printf("MARS task 1 create failed! (%d)\n", ret);
return 1;
@@ -128,7 +128,7 @@ int main(void)
snprintf(name, MARS_TASK_NAME_LEN_MAX, "Task 2.%d", i + 1);
ret = mars_task_create(mars_ctx, &task2_id[i], name,
- mpu_task2_prog.elf_image, MARS_TASK_CONTEXT_SAVE_ALL);
+ mpu_task2_prog.elf_image, MARS_TASK_CONTEXT_SAVE_SIZE_MAX);
if (ret) {
printf("MARS task 2 create failed! (%d)\n", ret);
return 1;
diff --git a/samples/schedule/host.c b/samples/schedule/host.c
index 37a10d1..d4b108f 100644
--- a/samples/schedule/host.c
+++ b/samples/schedule/host.c
@@ -70,7 +70,7 @@ int main(void)
}
ret = mars_task_create(mars_ctx, &task1_id, "Task 1",
- mpu_task1_prog.elf_image, MARS_TASK_CONTEXT_SAVE_ALL);
+ mpu_task1_prog.elf_image, MARS_TASK_CONTEXT_SAVE_SIZE_MAX);
if (ret) {
printf("MARS task 1 create failed! (%d)\n", ret);
return 1;
@@ -81,7 +81,7 @@ int main(void)
snprintf(name, MARS_TASK_NAME_LEN_MAX, "Task 2.%d", i);
ret = mars_task_create(mars_ctx, &task2_id[i], name,
- mpu_task2_prog.elf_image, NULL);
+ mpu_task2_prog.elf_image, 0);
if (ret) {
printf("MARS task 2 create failed! (%d)\n", ret);
return 1;
diff --git a/samples/semaphore/host.c b/samples/semaphore/host.c
index 29b0dee..4068f8f 100644
--- a/samples/semaphore/host.c
+++ b/samples/semaphore/host.c
@@ -80,7 +80,7 @@ int main(void)
snprintf(name, MARS_TASK_NAME_LEN_MAX, "Task %d", i);
ret = mars_task_create(mars_ctx, &task_id[i], name,
- mpu_task_prog.elf_image, MARS_TASK_CONTEXT_SAVE_ALL);
+ mpu_task_prog.elf_image, MARS_TASK_CONTEXT_SAVE_SIZE_MAX);
if (ret) {
printf("MARS task create failed! (%d)\n", ret);
return 1;
diff --git a/samples/shared_context/host.c b/samples/shared_context/host.c
index da0faff..983cd4e 100644
--- a/samples/shared_context/host.c
+++ b/samples/shared_context/host.c
@@ -66,7 +66,7 @@ void *thread_proc(void *arg)
pthread_mutex_unlock(&task_count_lock);
ret = mars_task_create(mars_ctx[index], &task_id[index], "Task",
- mpu_task_prog.elf_image, NULL);
+ mpu_task_prog.elf_image, 0);
if (ret) {
printf("MARS task create failed! (%d)\n", ret);
exit(1);
diff --git a/samples/signal/host.c b/samples/signal/host.c
index a63fad5..21daa59 100644
--- a/samples/signal/host.c
+++ b/samples/signal/host.c
@@ -60,14 +60,14 @@ int main(void)
}
ret = mars_task_create(mars_ctx, &task1_id, "Task 1",
- mpu_task1_prog.elf_image, MARS_TASK_CONTEXT_SAVE_ALL);
+ mpu_task1_prog.elf_image, MARS_TASK_CONTEXT_SAVE_SIZE_MAX);
if (ret) {
printf("MARS task 1 create failed! (%d)\n", ret);
return 1;
}
ret = mars_task_create(mars_ctx, &task2_id, "Task 2",
- mpu_task2_prog.elf_image, MARS_TASK_CONTEXT_SAVE_ALL);
+ mpu_task2_prog.elf_image, MARS_TASK_CONTEXT_SAVE_SIZE_MAX);
if (ret) {
printf("MARS task 2 create failed! (%d)\n", ret);
return 1;
diff --git a/samples/yield/host.c b/samples/yield/host.c
index 5ef8945..9344a1e 100644
--- a/samples/yield/host.c
+++ b/samples/yield/host.c
@@ -64,14 +64,14 @@ int main(void)
}
ret = mars_task_create(mars_ctx, &task1_id, "Task 1",
- mpu_task_prog.elf_image, MARS_TASK_CONTEXT_SAVE_ALL);
+ mpu_task_prog.elf_image, MARS_TASK_CONTEXT_SAVE_SIZE_MAX);
if (ret) {
printf("MARS task 1 create failed! (%d)\n", ret);
return 1;
}
ret = mars_task_create(mars_ctx, &task2_id, "Task 2",
- mpu_task_prog.elf_image, MARS_TASK_CONTEXT_SAVE_ALL);
+ mpu_task_prog.elf_image, MARS_TASK_CONTEXT_SAVE_SIZE_MAX);
if (ret) {
printf("MARS task 2 create failed! (%d)\n", ret);
return 1;