kern_types.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*
  2. * Mach Operating System
  3. * Copyright (c) 1992 Carnegie Mellon University
  4. * All Rights Reserved.
  5. *
  6. * Permission to use, copy, modify and distribute this software and its
  7. * documentation is hereby granted, provided that both the copyright
  8. * notice and this permission notice appear in all copies of the
  9. * software, derivative works or modified versions, and any portions
  10. * thereof, and that both notices appear in supporting documentation.
  11. *
  12. * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
  13. * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
  14. * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
  15. *
  16. * Carnegie Mellon requests users of this software to return to
  17. *
  18. * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
  19. * School of Computer Science
  20. * Carnegie Mellon University
  21. * Pittsburgh PA 15213-3890
  22. *
  23. * any improvements or extensions that they make and grant Carnegie Mellon
  24. * the rights to redistribute these changes.
  25. */
  26. #ifndef _KERN_KERN_TYPES_H_
  27. #define _KERN_KERN_TYPES_H_
  28. #include <mach/port.h> /* for mach_port_t */
  29. /*
  30. * Common kernel type declarations.
  31. * These are handles to opaque data structures defined elsewhere.
  32. *
  33. * These types are recursively included in each other`s definitions.
  34. * This file exists to export the common declarations to each
  35. * of the definitions, and to other files that need only the
  36. * type declarations.
  37. */
  38. /*
  39. * Task structure, from kern/task.h
  40. */
  41. typedef struct task * task_t;
  42. #define TASK_NULL ((task_t) 0)
  43. typedef mach_port_t * task_array_t; /* should be task_t * */
  44. /*
  45. * Thread structure, from kern/thread.h
  46. */
  47. typedef struct thread * thread_t;
  48. #define THREAD_NULL ((thread_t) 0)
  49. typedef mach_port_t * thread_array_t; /* should be thread_t * */
  50. /*
  51. * Processor structure, from kern/processor.h
  52. */
  53. typedef struct processor * processor_t;
  54. #define PROCESSOR_NULL ((processor_t) 0)
  55. /*
  56. * Processor set structure, from kern/processor.h
  57. */
  58. typedef struct processor_set * processor_set_t;
  59. #define PROCESSOR_SET_NULL ((processor_set_t) 0)
  60. #endif /* _KERN_KERN_TYPES_H_ */