world_thread.c
来自「开放源码实时操作系统源码.」· C语言 代码 · 共 54 行
C
54 行
#include <pkgconf/system.h> /* which packages are enabled/disabled */
#ifdef CYGPKG_KERNEL
# include <pkgconf/kernel.h>
#endif
#ifdef CYGPKG_LIBC
# include <pkgconf/libc.h>
#endif
#ifdef CYGPKG_IO_SERIAL
# include <pkgconf/io_serial.h>
#endif
#ifndef CYGFUN_KERNEL_API_C
# error Kernel API must be enabled to build this application
#endif
#ifndef CYGPKG_LIBC_STDIO
# error C library standard I/O must be enabled to build this application
#endif
#ifndef CYGPKG_IO_SERIAL_HALDIAG
# error I/O HALDIAG pseudo-device driver must be enabled to build this application
#endif
/* INCLUDES */
#include <stdio.h> /* printf */
#include <stdlib.h> /* printf */
#include <string.h> /* strlen */
#include <cyg/kernel/kapi.h> /* All the kernel specific stuff */
#include <cyg/infra/diag.h>
#define MWINCLUDECOLORS
#include "nano-X.h"
#include <microwin/ecos_mw_app.h>
_mw_app("World demo", world, ECOS_MW_APP_PRIORITY, 0);
//
// Component interfaces
//
externC int world_main(int argc, char *argv[]);
static void
world_thread(CYG_ADDRWORD data)
{
int argc = 1;
char *argv[] = {"world" };
cyg_thread_delay(10*100);
INIT_PER_THREAD_DATA();
world_main(argc, argv);
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?