#if (INCLUDE__UBINOS__UBIK_TEST == 1)
#if !(UBINOS__UBIK_TEST__EXCLUDE_TASKTESTSET == 1)
#include <stdio.h>
#define TASKARG ((void *) -3)
#define TASKWORKINGTIMEMS 1000
static void tasktest01_task1func(void * arg) {
if (TASKARG == arg) {
printf("task 1 is running\n");
}
else {
printf("task 1 received wrong argument\n");
}
printf("task 1 ends\n");
}
int r;
printf("\n");
printf("<test>\n");
printf("<name>ubik_test_tasktest01</name>\n");
printf("<description>Test on basic functions of task</description>\n");
printf("<message>\n");
printf("create task 1\n");
if (0 != r) {
printf("fail at task_create_noautodel(), err=%d\n", r);
r = -1;
goto end0;
}
if (0 != r) {
printf("fail at task_join_and_delete(), err=%d\n", r);
r = -1;
goto end0;
}
r = 0;
end0:
r = -1;
}
else {
r = 0;
}
printf("</message>\n");
printf("<result>");
if (0 == r) {
printf("pass");
}
else {
printf("fail");
}
printf("</result>\n");
printf("</test>\n");
printf("\n");
return r;
}
#endif
#endif
void bsp_busywait(unsigned int count)
unsigned int bsp_getbusywaitcountperms(void)
stdlib (Standard Library) API
int task_create_noautodel(task_pt *task_p, taskfunc_ft func, void *arg, int priority, unsigned int stackdepth, const char *name)
int task_join_and_delete(task_pt *task_p, int *result_p, int count)
int task_getpriority(task_pt task)
#define NULL
Definition: type.h:42
task_pt _g_ubik_test_task_a[4]
시험 용 태스크 배열
int ubik_test_tasktest01(void)
Test on basic functions of task.
volatile unsigned int _g_ubik_test_result
시험 결과를 저장하는 전역 변수