ipc_right.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. /*
  2. * Mach Operating System
  3. * Copyright (c) 1991,1990,1989 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. /*
  27. */
  28. /*
  29. * File: ipc/ipc_right.h
  30. * Author: Rich Draves
  31. * Date: 1989
  32. *
  33. * Declarations of functions to manipulate IPC capabilities.
  34. */
  35. #ifndef _IPC_IPC_RIGHT_H_
  36. #define _IPC_IPC_RIGHT_H_
  37. #include <mach/boolean.h>
  38. #include <mach/kern_return.h>
  39. #include <ipc/ipc_entry.h>
  40. #include <ipc/ipc_port.h>
  41. #define ipc_right_lookup_read ipc_right_lookup_write
  42. extern kern_return_t
  43. ipc_right_lookup_write(ipc_space_t, mach_port_t, ipc_entry_t *);
  44. extern boolean_t
  45. ipc_right_reverse(ipc_space_t, ipc_object_t,
  46. mach_port_t *, ipc_entry_t *);
  47. extern kern_return_t
  48. ipc_right_dnrequest(ipc_space_t, mach_port_t, boolean_t,
  49. ipc_port_t, ipc_port_t *);
  50. extern ipc_port_t
  51. ipc_right_dncancel(ipc_space_t, ipc_port_t, mach_port_t, ipc_entry_t);
  52. #define ipc_right_dncancel_macro(space, port, name, entry) \
  53. (((entry)->ie_request == 0) ? IP_NULL : \
  54. ipc_right_dncancel((space), (port), (name), (entry)))
  55. extern boolean_t
  56. ipc_right_inuse(ipc_space_t, mach_port_t, ipc_entry_t);
  57. extern boolean_t
  58. ipc_right_check(ipc_space_t, ipc_port_t, mach_port_t, ipc_entry_t);
  59. extern void
  60. ipc_right_clean(ipc_space_t, mach_port_t, ipc_entry_t);
  61. extern kern_return_t
  62. ipc_right_destroy(ipc_space_t, mach_port_t, ipc_entry_t);
  63. extern kern_return_t
  64. ipc_right_dealloc(ipc_space_t, mach_port_t, ipc_entry_t);
  65. extern kern_return_t
  66. ipc_right_delta(ipc_space_t, mach_port_t, ipc_entry_t,
  67. mach_port_right_t, mach_port_delta_t);
  68. extern kern_return_t
  69. ipc_right_info(ipc_space_t, mach_port_t, ipc_entry_t,
  70. mach_port_type_t *, mach_port_urefs_t *);
  71. extern boolean_t
  72. ipc_right_copyin_check(ipc_space_t, mach_port_t, ipc_entry_t,
  73. mach_msg_type_name_t);
  74. extern kern_return_t
  75. ipc_right_copyin(ipc_space_t, mach_port_t, ipc_entry_t,
  76. mach_msg_type_name_t, boolean_t,
  77. ipc_object_t *, ipc_port_t *);
  78. extern void
  79. ipc_right_copyin_undo(ipc_space_t, mach_port_t, ipc_entry_t,
  80. mach_msg_type_name_t, ipc_object_t, ipc_port_t);
  81. extern kern_return_t
  82. ipc_right_copyin_two(ipc_space_t, mach_port_t, ipc_entry_t,
  83. ipc_object_t *, ipc_port_t *);
  84. extern kern_return_t
  85. ipc_right_copyout(ipc_space_t, mach_port_t, ipc_entry_t,
  86. mach_msg_type_name_t, boolean_t, ipc_object_t);
  87. extern kern_return_t
  88. ipc_right_rename(ipc_space_t, mach_port_t, ipc_entry_t,
  89. mach_port_t, ipc_entry_t);
  90. #endif /* _IPC_IPC_RIGHT_H_ */