56 static char log[WIN_XSIZE * WIN_YSIZE];
58 static struct ctk_label loglabel = {
CTK_LABEL(0, 0, WIN_XSIZE, WIN_YSIZE, log)};
59 PROCESS(mt_process,
"Multi-threading test");
68 for(i = 1; i < WIN_YSIZE; i++) {
69 memcpy(&log[(i - 1) * WIN_XSIZE], &log[i * WIN_XSIZE], WIN_XSIZE);
71 memset(&log[(WIN_YSIZE - 1) * WIN_XSIZE], 0, WIN_XSIZE);
73 strncpy(&log[(WIN_YSIZE - 1) * WIN_XSIZE], str1, WIN_XSIZE);
79 thread_func(
char *str,
int len)
81 println((
char *) (str + len));
85 thread_func(str, len - 1);
89 println((
char *) (str + len));
93 thread_main(
void *data)
96 thread_func((
char *)data, 9);
106 static int toggle = 0;
107 static struct mt_thread th1;
108 static struct mt_thread th2;
114 memset(log, 0,
sizeof(log));
117 mt_start(&th1, thread_main,
"JIHGFEDCBA");
118 mt_start(&th2, thread_main,
"9876543210");
123 if(ev == PROCESS_EVENT_TIMER) {