home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / os / mach / 949 < prev    next >
Encoding:
Text File  |  1992-07-21  |  2.0 KB  |  60 lines

  1. Newsgroups: comp.os.mach
  2. Path: sparky!uunet!darwin.sura.net!tulane!cs.cs.uno.edu!shengru
  3. From: shengru@cs.uno.edu (Shengru Tu)
  4. Subject: message passing - port_insert_send (?)
  5. Message-ID: <1992Jul21.232633.1845@cs.uno.edu>
  6. Organization: University of New Orleans
  7. Date: Tue, 21 Jul 1992 23:26:33 GMT
  8. Lines: 50
  9.  
  10.  
  11. When I attempted to use the message-passing mechanism in Mach system (release 
  12. 2.0), on our NeXT stations I really feel frustrated by the on-line manual.  
  13. Here is an example:
  14.  
  15. *****************************************************************************
  16.         excerpt from the on-line manual of Mach release 2.0
  17. *****************************************************************************
  18. port_insert_receive(), port_insert_send()
  19.  
  20. SUMMARY Give a task rights with a specific name
  21.  
  22. SYNOPSIS
  23. #include <mach.h>
  24.  
  25. kern_return_t port_insert_receive(task_t task, port_t my_port, port_name_t 
  26. its_name) 
  27.  
  28. kern_return_t port_insert_send(task_t task, port_t my_port, 
  29. port_name_t its_name)
  30.  
  31. ARGUMENTS 
  32. task:  The task getting the new rights.
  33. my_port:  Rights supplied by the caller.
  34. its_name:  The name by which task will know the new rights.
  35.  
  36. DESCRIPTION
  37. The functions port_insert_receive() and port_insert_send() give a task rights 
  38. with a specific name.  If task already has rights named its_name, or has some 
  39. other name for my_port, the operation will fail.  its_name can't be a 
  40. predefined port, such as PORT_NULL.
  41.  
  42. port_insert_send() inserts send rights, and port_insert_receive() inserts 
  43. receive rights.
  44. *****************************************************************************
  45.  
  46. What is meant by "Rights supplied by the caller" for "my_port"?  And I 
  47. strongly believe that the type specification for "my_port" is miss-typed.
  48.  
  49. I guess that by port_allocate, one gets the name of the created name.  This
  50. name is for "my_port".  Then "its_name" should be a returned parameter 
  51. (output parameter) which can be used to fill out the remote port name in the
  52. header of a message.
  53.  
  54. Please advise if you have the experience.
  55.  
  56. Thanks in advance.
  57.  
  58. -Shengru
  59.  
  60.