#if (INCLUDE__UBINOS__UBIK_TEST == 1)
#if !(UBINOS__UBIK_TEST__EXCLUDE_TASKTESTSET == 1)
#include <stdio.h>
#define TASKLOOPCOUNT 10
#define TASKLOOPINTERVALMS 1000
static void tasktest00_taskfunc(void * arg) {
unsigned int i;
for (i=0; i<TASKLOOPCOUNT; i++) {
printf("hello world!\n");
}
}
int r;
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:
return r;
}
#endif
#endif
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_sleep(unsigned int tick)
int task_getpriority(task_pt task)
#define NULL
Definition: type.h:42
unsigned int ubik_timemstotick(unsigned int timems)
int ubik_test_tasktest00(void)
Simple task example.