📄 philosopherthread.h
字号:
/* =============================================================================
*
* Description: This is a C++ to C Thread Header file for Thread PhilosopherThread
*
* -----------------------------------------------------------------------------
* Comments:
*
* ===========================================================================*/
#ifndef _PhilosopherThread_H_
#define _PhilosopherThread_H_
#include "VDK.h"
#ifdef __ECC__ /* for C/C++ access */
#ifdef __cplusplus
extern "C" void PhilosopherThread_InitFunction(void**, VDK::Thread::ThreadCreationBlock *);
#else
extern "C" void PhilosopherThread_InitFunction(void**, VDK_ThreadCreationBlock *);
#endif
extern "C" void PhilosopherThread_DestroyFunction(void**);
extern "C" int PhilosopherThread_ErrorFunction(void**);
extern "C" void PhilosopherThread_RunFunction(void**);
#endif /* __ECC__ */
#ifdef __cplusplus
#include <new>
class PhilosopherThread_Wrapper : public VDK::Thread
{
public:
PhilosopherThread_Wrapper(VDK::Thread::ThreadCreationBlock &t)
: VDK::Thread(t)
{ PhilosopherThread_InitFunction(&m_DataPtr, &t); }
~PhilosopherThread_Wrapper()
{ PhilosopherThread_DestroyFunction(&m_DataPtr); }
int ErrorHandler()
{ return PhilosopherThread_ErrorFunction(&m_DataPtr); }
void Run()
{ PhilosopherThread_RunFunction(&m_DataPtr); }
static VDK::Thread* Create(VDK::Thread::ThreadCreationBlock &t)
{ return new (t) PhilosopherThread_Wrapper(t); }
};
#endif /* __cplusplus */
#endif /* _PhilosopherThread_H_ */
/* ========================================================================== */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -