2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
8 #include "exec_intern.h"
9 #include <aros/libcall.h>
10 #include <exec/ports.h>
11 #include <proto/exec.h>
13 /*****************************************************************************
17 AROS_LH1(void, ReplyMsg
,
20 AROS_LHA(struct Message
*, message
, A1
),
23 struct ExecBase
*, SysBase
, 63, Exec
)
26 Send a message back to where it came from. It's generally not
27 wise to access the fields of a message after it has been replied.
30 message - a message got with GetMsg().
41 WaitPort(), GetMsg(), PutMsg()
45 ******************************************************************************/
51 /* Protect the message against access by other tasks. */
55 port
=message
->mn_ReplyPort
;
57 /* Not set? Only mark the message as no longer sent. */
59 message
->mn_Node
.ln_Type
=NT_FREEMSG
;
62 /* Mark the message as replied */
63 message
->mn_Node
.ln_Type
=NT_REPLYMSG
;
65 /* Add it to the replyport's list */
66 AddTail(&port
->mp_MsgList
,&message
->mn_Node
);
70 /* And trigger the arrival action. */
71 switch(port
->mp_Flags
&PF_ACTION
)
75 Signal((struct Task
*)port
->mp_SigTask
,1<<port
->mp_SigBit
);
79 /* Raise a software interrupt */
80 Cause((struct Interrupt
*)port
->mp_SoftInt
);