home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 13 / 13.iso / s / s001 / 1.ddi / TS / SRC / TSDATA.CC < prev    next >
Encoding:
C/C++ Source or Header  |  1990-04-17  |  2.6 KB  |  69 lines

  1.                 /******************************************
  2.            *           TSDATA.C             *
  3.                * Copyright TimeSlice, Inc. 1985, 86, 87. *
  4.                ******************************************/
  5. /**************************************************************************/
  6. /**                                     **/
  7. /**   WARNING WARNING WARNING                         **/
  8. /**                                     **/
  9. /**   Compile this module without the /Gt option, else CRASH !?@*     **/
  10. /**                                     **/
  11. /**   1990/3/6       John BonnĂ©                         **/
  12. /**************************************************************************/
  13.  
  14. #include <ts.h>
  15.  
  16. PROCESS *curproc   = 0; /*pointer to current process*/
  17. PROCESS *_mainproc = 0; /*pointer to TSMAIN        */
  18. PROCESS *_idleproc = 0; /*pointer to TSIDLE, runs when all other taks are blocked */
  19.  
  20. TIMER    *_tpfrnt = 0;    /*head of TIMER structs list*/
  21.  
  22. char _tsfpc = 0,    /*if set a math coprocessor is present*/
  23.      _fpc_support = 1,    /*if set, and floating point processor is present,...*/
  24.             /*...save & restore FPC's context*/
  25.      _volguc = 0;    /*voluntary give up control flag*/
  26.  
  27. unsigned char
  28.      *_DosFlag = 0;     /*Look if slicer interupted DOS  */
  29.  
  30. int _critret = 0,     /*return address of last critical call*/
  31.     _ts_trace = 0,     /*Trace Slicer curprocess           */
  32.     _timcnt = 1,     /*units of time left to process       */
  33.     _tckcnt = 1,     /*timer tick counter*/
  34.     _tckrst = 1,     /*timer tick counter reset value*/
  35.     _ts_base = 0,     /*current base of stack*/
  36.     _sslev  = 0;     /*current level of ssleep()/swake() nesting*/
  37. unsigned
  38. int _stkseg  = 0,     /*main stack segment*/
  39.     _datseg  = 0,     /*static data segment*/
  40.     _codseg  = 0,     /*first code segment*/
  41.     _vidseg  = 0,     /*video segment*/
  42.     _crlev   = 0,     /*current level of critstart/critend nesting*/
  43.     _idle    = 0,     /*current level of critstart/critend nesting*/
  44.     _i13Flag = 0;     /*Look if slicer File IO  */
  45.  
  46. INTLST *ilhead = 0;     /* points to head of intr list */
  47.  
  48. void (*intexit)() = 0,    /*if set, points to intrest()*/
  49.      (*ovfsvc)() = 0 ;    /*overflow service function (only if != NULL)*/
  50.  
  51. CHAN *_chfrnt = 0;    /* pointer to linked list of channels */
  52.  
  53. #define MAXCRCLASS 16    /*maximum number of critical classes*/
  54. CRCLASS crit_tab[ MAXCRCLASS ],
  55.     *crit_stop = crit_tab + MAXCRCLASS;
  56.  
  57. #define ISTKSIZ (0x800)     /*default interrupt stack_of_stacks size*/
  58.  
  59. int _istk[ ISTKSIZ ] = { 0 },    /*stack of stacks used by interupt processing*/
  60.     *_isbase = _istk,        /*pointer to base of stack of stacks*/
  61.     *_istop = _istk + ISTKSIZ;    /*ptr to 1 word above available _istk*/
  62.  
  63. /***
  64. * To force main() to be pulled in.
  65. ***/
  66. #undef    main
  67. void main() ;
  68. static    void    (*mptr)() = main ;
  69.