Updated PCI IDs to latest snapshot.
[tangerine.git] / rom / exec / deletemsgport.c
blob4eae790fe47f84a468c18559c3b9b83e8d934787
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Free a message port.
6 Lang: english
7 */
8 #include <exec/ports.h>
9 #include <exec/execbase.h>
10 #include <aros/libcall.h>
11 #include <proto/exec.h>
13 /*****************************************************************************
15 NAME */
17 AROS_LH1(void, DeleteMsgPort,
19 /* SYNOPSIS */
20 AROS_LHA(struct MsgPort *, port, A0),
22 /* LOCATION */
23 struct ExecBase *, SysBase, 112, Exec)
25 /* FUNCTION
26 Delete a messageport allocated with CreateMsgPort(). The signal bit
27 is freed and the memory is given back to the memory pool. Remaining
28 messages are not replied. It is safe to call this function with a
29 NULL pointer.
31 INPUTS
32 port - Pointer to messageport structure.
34 RESULT
36 NOTES
38 EXAMPLE
40 BUGS
42 SEE ALSO
44 INTERNALS
46 ******************************************************************************/
48 AROS_LIBFUNC_INIT
50 /* Only if there is something to free */
51 if(port!=NULL)
53 /* Free signal bit */
54 FreeSignal(port->mp_SigBit);
56 /* And memory */
57 FreeMem(port,sizeof(struct MsgPort));
59 AROS_LIBFUNC_EXIT
60 } /* DeleteMsgPort */