a1200   NEWS   APPS   DOCS   ABOUT
a1200
----
a1200
----
Autodocs
 Static lib:
 amiga.lib
  ACrypt
  AddTOF
  ArgArrayDone
  ArgArrayInit
  ArgInt
  ArgString
  BeginIO
  CallHook
  CallHookA
  CheckRexxMsg
  CoerceMethod
  CoerceMethodA
  CreateExtIO
  CreatePort
  CreateStdIO
  CreateTask
  CxCustom
  CxDebug
  CxFilter
  CxSender
  CxSignal
  CxTranslate
  DeleteExtIO
  DeletePort
  DeleteStdIO
  DeleteTask
  DoMethod
  DoMethodA
  DoSuperMethod
  DoSuperMethodA
  FastRand
  FreeIEvents
  GetRexxVar
  HookEntry
  HotKey
  InvertString
  LibAllocPooled
  LibCreatePool
  LibDeletePool
  LibFreePooled
  NewList
  RangeRand
  RemTOF
  SetRexxVar
  SetSuperAttrs
  TimeDelay
  afp
  arnd
  dbf
  fpa
  printf
  sprintf
  stdio
Include
GuruMeditation
Docs » Autodocs » amiga.lib » CreatePort

NAME

	CreatePort - Allocate and initialize a new message port

SYNOPSIS

	port = CreatePort(name,pri)
struct MsgPort *CreatePort(STRPTR,LONG);

FUNCTION

	Allocates and initializes a new message port. The message list
of the new port will be prepared for use (via NewList). A signal
bit will be allocated, and the port will be set to signal your
task when a message arrives (PA_SIGNAL).
You *must* use DeletePort() to delete ports created with
CreatePort()!

INPUTS

	name - public name of the port, or NULL if the port is not named.
The name string is not copied. Most ports do not need names,
see notes below on this.
pri - Priority used for insertion into the public port list,
normally 0.

RESULT

	port - a new MsgPort structure ready for use, or NULL if the port
could not be created due to not enough memory or no available
signal bit.

NOTES

	In most cases, ports should not be named. Named ports are used for
rendez-vous between tasks. Everytime a named port needs to be located,
the list of all named ports must be traversed. The more named
ports there are, the longer this list traversal takes. Thus, unless
you really need to, do not name your ports, which will keep them off
of the named port list and improve system performance.

BUGS

	With versions of amiga.lib prior to V37.14, this function would
not fail even though it couldn't allocate a signal bit. The port
would be returned with no signal allocated.

SEE ALSO

DeletePort(), exec.library/FindPort(), <exec/ports.h>, exec.library/CreateMsgPort()

Comments

Name:
E-mail: Use this if you want a message if you get a response, will not be shown.
Comment:
Select correct short for:

Abyss

CSL
FC
AYS
ATX

Comments:

$VER: d0.se 1.14 Copyright © 2011-2024 Tobias Geijersson support at d0 dot se