home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.mach
- Path: sparky!uunet!darwin.sura.net!tulane!cs.cs.uno.edu!shengru
- From: shengru@cs.uno.edu (Shengru Tu)
- Subject: message passing - port_insert_send (?)
- Message-ID: <1992Jul21.232633.1845@cs.uno.edu>
- Organization: University of New Orleans
- Date: Tue, 21 Jul 1992 23:26:33 GMT
- Lines: 50
-
-
- When I attempted to use the message-passing mechanism in Mach system (release
- 2.0), on our NeXT stations I really feel frustrated by the on-line manual.
- Here is an example:
-
- *****************************************************************************
- excerpt from the on-line manual of Mach release 2.0
- *****************************************************************************
- port_insert_receive(), port_insert_send()
-
- SUMMARY Give a task rights with a specific name
-
- SYNOPSIS
- #include <mach.h>
-
- kern_return_t port_insert_receive(task_t task, port_t my_port, port_name_t
- its_name)
-
- kern_return_t port_insert_send(task_t task, port_t my_port,
- port_name_t its_name)
-
- ARGUMENTS
- task: The task getting the new rights.
- my_port: Rights supplied by the caller.
- its_name: The name by which task will know the new rights.
-
- DESCRIPTION
- The functions port_insert_receive() and port_insert_send() give a task rights
- with a specific name. If task already has rights named its_name, or has some
- other name for my_port, the operation will fail. its_name can't be a
- predefined port, such as PORT_NULL.
-
- port_insert_send() inserts send rights, and port_insert_receive() inserts
- receive rights.
- *****************************************************************************
-
- What is meant by "Rights supplied by the caller" for "my_port"? And I
- strongly believe that the type specification for "my_port" is miss-typed.
-
- I guess that by port_allocate, one gets the name of the created name. This
- name is for "my_port". Then "its_name" should be a returned parameter
- (output parameter) which can be used to fill out the remote port name in the
- header of a message.
-
- Please advise if you have the experience.
-
- Thanks in advance.
-
- -Shengru
-
-