UP 模拟器 加入key的模拟支持
This commit is contained in:
14
sim/thread/sim_thread.h
Normal file
14
sim/thread/sim_thread.h
Normal file
@@ -0,0 +1,14 @@
|
||||
#ifndef HW_LIB_SIM_THREAD_H
|
||||
#define HW_LIB_SIM_THREAD_H
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef void (*Thread_Func_t)(void *pArg);
|
||||
|
||||
void ThreadCreat(Thread_Func_t func, unsigned int stackSize, void *pArg);
|
||||
void ThreadStop();
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif //HW_LIB_SIM_THREAD_H
|
11
sim/thread/thread.cpp
Normal file
11
sim/thread/thread.cpp
Normal file
@@ -0,0 +1,11 @@
|
||||
#include "sim_thread.h"
|
||||
#include <windows.h>
|
||||
#include <process.h>
|
||||
|
||||
void ThreadCreat(Thread_Func_t func, unsigned int stackSize, void *pArg) {
|
||||
_beginthread(func, stackSize, pArg);
|
||||
}
|
||||
|
||||
void ThreadStop() {
|
||||
_endthread();
|
||||
}
|
Reference in New Issue
Block a user