2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
10 #include <proto/exec.h>
11 #include "asl_intern.h"
13 /*****************************************************************************
17 AROS_LH1(void, AbortAslRequest
,
20 AROS_LHA(APTR
, requester
, A0
),
23 struct Library
*, AslBase
, 13, Asl
)
42 27-11-96 digulla automatically created from
43 asl_lib.fd and clib/asl_protos.h
45 *****************************************************************************/
49 struct ReqNode
*reqnode
;
51 if (!requester
) return;
53 ObtainSemaphore( &(ASLB(AslBase
)->ReqListSem
));
55 reqnode
= FindReqNode(requester
, ASLB(AslBase
));
58 if (reqnode
->rn_ReqWindow
)
61 struct IntuiMessage msg
;
64 sig
= AllocSignal(-1);
65 if (sig
== -1) sig
= SIGB_SINGLE
;
67 mp
.mp_Node
.ln_Type
= NT_MSGPORT
;
68 mp
.mp_Node
.ln_Pri
= 0;
69 mp
.mp_Node
.ln_Name
= NULL
;
70 mp
.mp_Flags
= PA_SIGNAL
;
71 mp
.mp_SigTask
= FindTask(NULL
);
73 NEWLIST(&mp
.mp_MsgList
);
75 msg
.ExecMessage
.mn_Node
.ln_Type
= NT_MESSAGE
;
76 msg
.ExecMessage
.mn_ReplyPort
= &mp
;
77 msg
.ExecMessage
.mn_Length
= sizeof(msg
);
78 msg
.Class
= IDCMP_CLOSEWINDOW
;
81 msg
.IAddress
= reqnode
->rn_ReqWindow
;
86 msg
.IDCMPWindow
= reqnode
->rn_ReqWindow
;
89 SetSignal(0, 1L << sig
);
90 PutMsg(reqnode
->rn_ReqWindow
->UserPort
, &msg
.ExecMessage
);
93 if (sig
!= SIGB_SINGLE
) FreeSignal(sig
);
95 } /* if (reqnode->rn_ReqWindow) */
99 ReleaseSemaphore(&(ASLB(AslBase
)->ReqListSem
));
104 } /* AbortAslRequest */