Test current SDI headers.
[AROS.git] / rom / exec / replymsg.c
blob4f692eb9e254e3a4cb804b3e58a7d189732fba78
1 /*
2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Reply a message
6 Lang: english
7 */
9 #include <aros/libcall.h>
10 #include <exec/ports.h>
11 #include <proto/exec.h>
13 #include "exec_intern.h"
14 #include "exec_util.h"
16 /*****************************************************************************
18 NAME */
20 AROS_LH1(void, ReplyMsg,
22 /* SYNOPSIS */
23 AROS_LHA(struct Message *, message, A1),
25 /* LOCATION */
26 struct ExecBase *, SysBase, 63, Exec)
28 /* FUNCTION
29 Send a message back to where it came from. It's generally not
30 wise to access the fields of a message after it has been replied.
32 INPUTS
33 message - a message got with GetMsg().
35 RESULT
37 NOTES
39 EXAMPLE
41 BUGS
43 SEE ALSO
44 WaitPort(), GetMsg(), PutMsg()
46 INTERNALS
48 ******************************************************************************/
50 AROS_LIBFUNC_INIT
52 struct MsgPort *port;
54 /* Get replyport */
55 port=message->mn_ReplyPort;
57 /* Not set? Only mark the message as no longer sent. */
58 if(port==NULL)
59 message->mn_Node.ln_Type=NT_FREEMSG;
60 else
62 /* Mark the message as replied */
63 message->mn_Node.ln_Type=NT_REPLYMSG;
65 InternalPutMsg(port, message, SysBase);
68 AROS_LIBFUNC_EXIT
69 } /* ReplyMsg() */