Unit 'EXEC' Package
[Overview][Constants][Types][Procedures and functions][Variables][Index] [#amunits]

AddPort

Add a public message port to the system

Declaration

Source position: exec.pas line 1186

procedure AddPort(

  port: pMsgPort

);

Arguments

port

  

Pointer to a message port

Description

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.

See also

RemPort

  

Remove a message port from the system

FindPort

  

Find a system message port by name


Documentation generated on: 2021-07-30