mach_port.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*
  2. * Mach Port Functions.
  3. * Copyright (C) 2008 Free Software Foundation, Inc.
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2, or (at your option)
  8. * any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program; if not, write to the Free Software
  17. * Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  18. *
  19. * Author: Barry deFreese.
  20. */
  21. /*
  22. * Mach port functions.
  23. *
  24. */
  25. #ifndef _IPC_MACH_PORT_H_
  26. #define _IPC_MACH_PORT_H_
  27. #include <sys/types.h>
  28. #include <ipc/ipc_types.h>
  29. #include <ipc/ipc_entry.h>
  30. extern kern_return_t
  31. mach_port_allocate_name (
  32. ipc_space_t space,
  33. mach_port_right_t right,
  34. mach_port_t name);
  35. extern kern_return_t
  36. mach_port_allocate (
  37. ipc_space_t space,
  38. mach_port_right_t right,
  39. mach_port_t *namep);
  40. extern kern_return_t
  41. mach_port_destroy(
  42. ipc_space_t space,
  43. mach_port_t name);
  44. extern kern_return_t
  45. mach_port_deallocate(
  46. ipc_space_t space,
  47. mach_port_t name);
  48. extern kern_return_t
  49. mach_port_insert_right(
  50. ipc_space_t space,
  51. mach_port_t name,
  52. ipc_port_t poly,
  53. mach_msg_type_name_t polyPoly);
  54. kern_return_t
  55. mach_port_get_receive_status(
  56. ipc_space_t space,
  57. mach_port_t name,
  58. mach_port_status_t *statusp);
  59. #if MACH_KDB
  60. void db_debug_port_references (boolean_t enable);
  61. #endif /* MACH_KDB */
  62. #endif /* _IPC_MACH_PORT_H_ */