home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume28 / m0 / part01 / proc.h < prev    next >
C/C++ Source or Header  |  1994-06-05  |  1KB  |  58 lines

  1. /*
  2.     proc.h
  3. */
  4. /*  Copyright (c) 1994 Christian F. Tschudin. All rights reserved.
  5.  
  6.     Distributed under the terms of the GNU General Public License
  7.     version 2 of june 1991 as published by the Free Software
  8.     Foundation, Inc.
  9.  
  10.              This file is part of M0.
  11.  
  12. M0 is distributed in the hope that it will be useful, but WITHOUT ANY
  13. WARRANTY.  No author or distributor accepts responsibility to anyone for
  14. the consequences of using it or for whether it serves any particular
  15. purpose or works at all, unless he says so in writing.  Refer to the GNU
  16. General Public License for full details. 
  17.  
  18. Everyone is granted permission to copy, modify and redistribute M0, but
  19. only under the conditions described in the GNU General Public License. 
  20. A copy of this license is supposed to have been given to you along with
  21. M0 so you can know your rights and responsibilities.  It should be in a
  22. file named LICENSE.  Among other things, the copyright notice and this
  23. notice must be preserved on all copies.  */
  24.  
  25. #ifndef PROC_H
  26. #define PROC_H
  27.  
  28. #include "error.h"
  29. #include "element.h"
  30.  
  31. #define MAXOSTACK    300
  32. #define MAXDSTACK    16
  33. #define MAXESTACK    100
  34.  
  35. struct mproc_s {
  36.     ushort pid;
  37.     struct element_s local[MAXLOCALS];
  38.     sshort os[MAXOSTACK];
  39.     sshort ds[MAXDSTACK];
  40.     sshort es[MAXESTACK];
  41.     ushort osp, dsp, esp;
  42.     byte state;
  43.     eindex err_element;
  44.     retcode last_error;
  45.     mproc next, last, qtail, timelink;
  46.     eindex qkey, timeout;
  47. };
  48.  
  49. enum {
  50.     S_RUNNING, S_BLOCKED, S_TERMINATED
  51. };
  52.  
  53.  
  54. #endif
  55.  
  56.  
  57.  
  58.