Add a public message port to the system
Source position: exec.pas line 1941
procedure AddPort( |
port: PMsgPort |
); |
port |
|
Pointer to a message port |
This function attaches a message port structure to the system's public message port list, where it can be found by the FindPort() function. The name and priority fields of the port structure must be initialized prior to calling this function. If the user does not require the priority field, it should be initialized to zero.
Only ports that will be searched for with FindPort() need to be added to the system list. In addition, adding ports is often useful during debugging. If the port will be searched for, the priority field should be at least 1 (to avoid the large number of inactive ports at priority zero). If the port will be searched for often, set the priority in the 50-100 range (so it will be before other less used ports).
Once a port has been added to the naming list, you must be careful to remove the port from the list (via RemPort()) before deallocating its memory.
Do not AddPort an active port.
|
Remove a message port from the system |
|
|
Find a system message port by name |