Category : Files from Magazines
Archive   : UCOS.ZIP
Filename : UCOS.H

 
Output of file : UCOS.H contained in archive : UCOS.ZIP
/*
***********************************************************
* UCOS.H
* SYSTEM DECLARATIONS
***********************************************************
* uCOS CONSTANTS
***********************************************************
*/
#define OS_LO_PRIO 63 /*IDLE task priority */

/*TASK STATUS */
#define OS_STAT_RDY 0x00 /*Ready to run */

#define OS_STAT_MBOX 0x01 /*Pending on mailbox */
#define OS_STAT_SEM 0x02 /*Pending on semaphore */
#define OS_STAT_Q 0x04 /*Pending on queue */
#define OS_STAT_RES1 0x08 /*Reserved */
#define OS_STAT_RES2 0x10 /*Reserved */
#define OS_STAT_RES3 0x20 /*Reserved */
#define OS_STAT_RES4 0x40 /*Reserved */
#define OS_STAT_RES5 0x80 /*Reserved */
/*
***********************************************************
* uCOS TASK CONTROL BLOCK DATA STRUCTURE
***********************************************************
*/
typedef struct os_tcb {
void *OSTCBStkPtr;
UBYTE OSTCBStat;
UBYTE OSTCBPrio;
UWORD OSTCBDly;
struct os_tcb *OSTCBNext;
struct os_tcb *OSTCBPrev;
} OS_TCB;
/*
***********************************************************
* uCOS GLOBAL VARIABLES
***********************************************************
*/
extern BOOLEAN OSRunning;
extern OS_TCB *OSTCBCur;
extern OS_TCB *OSTCBHighRdy;
extern UBYTE OSRdyGrp;
extern UBYTE OSRdyTbl[];
extern OS_TCB *OSTCBPrioTbl[];
extern OS_TCB OSTCBTbl[];
extern OS_TCB *OSTCBList;
extern UBYTE OSLockNesting;
extern UBYTE OSIntNesting;
extern OS_TCB *OSTCBFreeList;
extern UBYTE OSMapTbl[];
extern UBYTE OSUnMapTbl[];
/*
***********************************************************
* uCOS FUNCTION PROTOTYPES
***********************************************************
*/
void OSInit(void *idle_stk, UBYTE maxtasks);
void OSStart(void);
void OSTaskCreate(void (far *task)(void *dptr),
void *data,
void *pstk,
UBYTE prio);
void OSTimeDly(UWORD ticks);
void OSTimeTick(void);
void OSIntEnter(void);
void OSIntExit(void);
void far OSCtxSw(void);
void OSIntCtxSw(void);
void far OSTickISR(void);
void OSStartHighRdy(void);
void OSSched(void);
OS_TCB *OSTCBGetFree(void);


  3 Responses to “Category : Files from Magazines
Archive   : UCOS.ZIP
Filename : UCOS.H

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/