48 lines
996 B
C
48 lines
996 B
C
![]() |
#include <stdio.h>
|
||
|
#include <stdlib.h>
|
||
|
#include <string.h>
|
||
|
#include <sys/timerfd.h>
|
||
|
#include <sys/mman.h>
|
||
|
#include <unistd.h>
|
||
|
#include <sys/types.h>
|
||
|
#include <sys/stat.h>
|
||
|
#include <fcntl.h>
|
||
|
|
||
|
#include "osp.h"
|
||
|
|
||
|
|
||
|
static int32_t osp_tesk_init1(void)
|
||
|
{
|
||
|
void *pTimer;
|
||
|
int32_t ret;
|
||
|
|
||
|
pTimer = osp_timer_create_sim(OspTestTask, 1, 1, 0);
|
||
|
ret = osp_timer_start(pTimer);
|
||
|
|
||
|
|
||
|
return ret;
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
static void osp_tesk_main1(Osp_Msg_Head *pMsg)
|
||
|
{
|
||
|
char buf[] = "Osposp_tesk_main1***************************************************************************************************************************************************************************************";
|
||
|
|
||
|
osp_dbg_log(buf, strlen(buf));
|
||
|
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
OSP_TASKMSG_REG g_TestRegTbl[] =
|
||
|
{
|
||
|
|
||
|
{OspTestTask, "OspTestTask", NOMARL_NOMSG_PRI(20), (OSP_FUNCPTR)osp_tesk_init1, (OSP_FUNCPTR)osp_tesk_main1, 0, OSP_PROCESS_MSG},
|
||
|
|
||
|
};
|
||
|
|
||
|
const uint32_t g_RegTestNum = OSP_NELEMENTS(g_TestRegTbl);
|
||
|
|
||
|
|