com.h 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /* System calls. */
  2. #define SEND 1 /* function code for sending messages */
  3. #define RECEIVE 2 /* function code for receiving messages */
  4. #define BOTH 3 /* function code for SEND + RECEIVE */
  5. #define ANY (NR_PROCS+100) /* receive(ANY, buf) accepts from any source */
  6. /* Task numbers, function codes and reply codes. */
  7. #define HARDWARE -1 /* used as source on interrupt generated msgs */
  8. #define SYSTASK -2 /* internal functions */
  9. # define SYS_XIT 1 /* fcn code for sys_xit(parent, proc) */
  10. # define SYS_GETSP 2 /* fcn code for sys_sp(proc, &new_sp) */
  11. # define SYS_SIG 3 /* fcn code for sys_sig(proc, sig) */
  12. # define SYS_FORK 4 /* fcn code for sys_fork(parent, child) */
  13. # define SYS_NEWMAP 5 /* fcn code for sys_newmap(procno, map_ptr) */
  14. # define SYS_COPY 6 /* fcn code for sys_copy(ptr) */
  15. # define SYS_EXEC 7 /* fcn code for sys_exec(procno, new_sp) */
  16. # define SYS_TIMES 8 /* fcn code for sys_times(procno, bufptr) */
  17. # define SYS_ABORT 9 /* fcn code for sys_abort() */
  18. #ifdef ATARI_ST
  19. # define SYS_FRESH 10 /* fcn code for sys_fresh() */
  20. #endif
  21. #define CLOCK -3 /* clock class */
  22. # define SET_ALARM 1 /* fcn code to CLOCK, set up alarm */
  23. # define CLOCK_TICK 2 /* fcn code for clock tick */
  24. # define GET_TIME 3 /* fcn code to CLOCK, get real time */
  25. # define SET_TIME 4 /* fcn code to CLOCK, set real time */
  26. # define REAL_TIME 1 /* reply from CLOCK: here is real time */
  27. #define MEM -4 /* /dev/ram, /dev/(k)mem and /dev/null class */
  28. # define RAM_DEV 0 /* minor device for /dev/ram */
  29. # define MEM_DEV 1 /* minor device for /dev/mem */
  30. # define KMEM_DEV 2 /* minor device for /dev/kmem */
  31. # define NULL_DEV 3 /* minor device for /dev/null */
  32. #define FLOPPY -5 /* floppy disk class */
  33. #define WINCHESTER -6 /* winchester (hard) disk class */
  34. # define DISKINT 1 /* fcn code for disk interupt */
  35. # define DISK_READ 3 /* fcn code to DISK (must equal TTY_READ) */
  36. # define DISK_WRITE 4 /* fcn code to DISK (must equal TTY_WRITE) */
  37. # define DISK_IOCTL 5 /* fcn code for setting up RAM disk */
  38. #define TTY -7 /* terminal I/O class */
  39. #define PRINTER -8 /* printer I/O class */
  40. # define TTY_CHAR_INT 1 /* fcn code for tty input interrupt */
  41. # define TTY_O_DONE 2 /* fcn code for tty output done */
  42. # define TTY_READ 3 /* fcn code for reading from tty */
  43. # define TTY_WRITE 4 /* fcn code for writing to tty */
  44. # define TTY_IOCTL 5 /* fcn code for ioctl */
  45. # define SUSPEND -998 /* used in interrupts when tty has no data */
  46. /* Names of message fields for messages to CLOCK task. */
  47. #define DELTA_TICKS m6_l1 /* alarm interval in clock ticks */
  48. #define FUNC_TO_CALL m6_f1 /* pointer to function to call */
  49. #define NEW_TIME m6_l1 /* value to set clock to (SET_TIME) */
  50. #define CLOCK_PROC_NR m6_i1 /* which proc (or task) wants the alarm? */
  51. #define SECONDS_LEFT m6_l1 /* how many seconds were remaining */
  52. /* Names of message fields used for messages to block and character tasks. */
  53. #define DEVICE m2_i1 /* major-minor device */
  54. #define PROC_NR m2_i2 /* which (proc) wants I/O? */
  55. #define COUNT m2_i3 /* how many bytes to transfer */
  56. #define POSITION m2_l1 /* file offset */
  57. #define ADDRESS m2_p1 /* core buffer address */
  58. /* Names of message fields for messages to TTY task. */
  59. #define TTY_LINE m2_i1 /* message parameter: terminal line */
  60. #define TTY_REQUEST m2_i3 /* message parameter: ioctl request code */
  61. #define TTY_SPEK m2_l1 /* message parameter: ioctl speed, erasing */
  62. #define TTY_FLAGS m2_l2 /* message parameter: ioctl tty mode */
  63. /* Names of messages fields used in reply messages from tasks. */
  64. #define REP_PROC_NR m2_i1 /* # of proc on whose behalf I/O was done */
  65. #define REP_STATUS m2_i2 /* bytes transferred or error number */
  66. /* Names of fields for copy message to SYSTASK. */
  67. #define SRC_SPACE m5_c1 /* T or D space (stack is also D) */
  68. #define SRC_PROC_NR m5_i1 /* process to copy from */
  69. #define SRC_BUFFER m5_l1 /* virtual address where data come from */
  70. #define DST_SPACE m5_c2 /* T or D space (stack is also D) */
  71. #define DST_PROC_NR m5_i2 /* process to copy to */
  72. #define DST_BUFFER m5_l2 /* virtual address where data go to */
  73. #define COPY_BYTES m5_l3 /* number of bytes to copy */
  74. /* Field names for accounting, SYSTASK and miscellaneous. */
  75. #define USER_TIME m4_l1 /* user time consumed by process */
  76. #define SYSTEM_TIME m4_l2 /* system time consumed by process */
  77. #define CHILD_UTIME m4_l3 /* user time consumed by process' children */
  78. #define CHILD_STIME m4_l4 /* system time consumed by proces children */
  79. #define PROC1 m1_i1 /* indicates a process */
  80. #define PROC2 m1_i2 /* indicates a process */
  81. #define PID m1_i3 /* process id passed from MM to kernel */
  82. #define STACK_PTR m1_p1 /* used for stack ptr in sys_exec, sys_getsp */
  83. #define PR m6_i1 /* process number for sys_sig */
  84. #define SIGNUM m6_i2 /* signal number for sys_sig */
  85. #define FUNC m6_f1 /* function pointer for sys_sig */
  86. #define MEM_PTR m1_p1 /* tells where memory map is for sys_newmap */
  87. #define CANCEL 0 /* general request to force a task to cancel */
  88. #define SIG_MAP m1_i2 /* used by kernel for passing signal bit map */