# NewMsgPort

Creates a message port.

### Synopsis

`Item NewMsgPort (uint32* signalMaskPtr)`

### Description

Creates a new message port. `NewMsgPort()` is used by the DataStreamer kernel thread to create message ports for receiving signals from other threads, such as acquisition or subscriber threads. Acquisition threads use `NewMsgPort()` to create message ports for receiving signals regarding data streams (for example, a request to read a specific sequence of stream data chunks).

The Portfolio kernel assigns each new message port a signal mask. `NewMsgPort()` calls `GetMsgPortSignal()` directly to assign this signal mask to `signalMaskPtr`.

`NewMsgPort()` calls `CreateItem()` directly to create the message port item.

### Arguments

`signalMaskPtr`
  Pointer to the initialization signal for the message port. If set to `NULL`, the signal mask is not assigned.

### Return Value

Value
  Error Condition

(The item of the message port)
  None

(Portfolio error code)
  `CreateItem()` failed

See "Error Messages" in the 3DO Portfolio Reference Manual for a listing of error messages returned by `CreateItem()`.

### Associated Files

MsgUtils.h

### See Also

`CreateItem CreateMsgPort DisposeDataStream`