⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qdpp.h

📁 量子编程源代码 量子编程源代码
💻 H
字号:
/****************************************************************************** Product: QDPP example, QK, 80x86, Trubo C++ 1.01* Last Updated for Version: 3.1.06* Date of the Last Update:  May 06, 2006**                    Q u a n t u m     L e a P s*                    ---------------------------*                    innovating embedded systems** Copyright (c) 2002-2006 Quantum Leaps, LLC. All rights reserved.** Internet: www.quantum-leaps.com     Licensing: sales@quantum-leaps.com** This Software is protected by the United States copyright laws and* international treaties. Distribution of products containing this Software* or based upon this Software (Derivative Works) requires a valid Quantum* Leaps Distribution License. Any other distribution, in source or binary* format is illegal.*****************************************************************************/#ifndef qdpp_h#define qdpp_henum DPPSignals {   HUNGRY_SIG = Q_USER_SIG,         /* sent when philosopher becomes hungry */   DONE_SIG,                        /* sent by philosopher when done eating */   EAT_SIG,                       /* sent by Table to let a philosopher eat */   TERMINATE_SIG,   KBD_SIG,   MAX_PUB_SIG                                 /* the last published signal */};typedef struct TableEvtTag TableEvt;struct TableEvtTag {    QEvent super_;    uint8_t philNum;                                  /* philosopher number */};typedef struct KbdEvtTag KbdEvt;struct KbdEvtTag {    QEvent super_;    uint8_t key;};enum { N = 5 };                                   /* number of philosophers */void philosopherStart(uint8_t n, uint8_t prio,                      QEvent const *qSto[], uint32_t qLen,                      void *stkSto, uint32_t stkSize);void tableStart(uint8_t prio,                QEvent const *qSto[], uint32_t qLen,                void *stkSto, uint32_t stkSize);void kbdMgrStart(uint8_t prio,                 QEvent const *qSto[], uint32_t qLen,                 void *stkSto, uint32_t stkSize);             /* implementation-dependent Philosopher status-display routine */void displyPhilStat(uint8_t n, char const *stat);                    /* implementation-dependent preemptions-display routine */void displayPreemptions(uint8_t pin, uint8_t pcurr);                              /* implementation-dependent key-press dispaly */void displayKey(uint8_t key);                                     /* to emulate very long RTC processing */void busyDelay(void);extern QActive *QDPP_table;#endif                                                            /* qdpp_h */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -