2 Copyright © 1995-2017, The AROS Development Team. All rights reserved.
10 #include <proto/exec.h>
11 #include "asl_intern.h"
15 /*****************************************************************************
19 AROS_LH1(void, AbortAslRequest
,
22 AROS_LHA(APTR
, requester
, A0
),
25 struct Library
*, AslBase
, 13, Asl
)
44 27-11-96 digulla automatically created from
45 asl_lib.fd and clib/asl_protos.h
47 *****************************************************************************/
51 struct ReqNode
*reqnode
;
53 if (!requester
) return;
55 ObtainSemaphore( &(ASLB(AslBase
)->ReqListSem
));
57 reqnode
= FindReqNode(requester
, ASLB(AslBase
));
60 if (reqnode
->rn_ReqWindow
)
63 struct IntuiMessage msg
;
66 sig
= AllocSignal(-1);
67 if (sig
== -1) sig
= SIGB_SINGLE
;
69 memset( &mp
, 0, sizeof( mp
) );
70 mp
.mp_Node
.ln_Type
= NT_MSGPORT
;
71 mp
.mp_Flags
= PA_SIGNAL
;
72 mp
.mp_SigTask
= FindTask(NULL
);
74 NEWLIST(&mp
.mp_MsgList
);
76 msg
.ExecMessage
.mn_Node
.ln_Type
= NT_MESSAGE
;
77 msg
.ExecMessage
.mn_ReplyPort
= &mp
;
78 msg
.ExecMessage
.mn_Length
= sizeof(msg
);
79 msg
.Class
= IDCMP_CLOSEWINDOW
;
82 msg
.IAddress
= reqnode
->rn_ReqWindow
;
87 msg
.IDCMPWindow
= reqnode
->rn_ReqWindow
;
90 SetSignal(0, 1L << sig
);
91 PutMsg(reqnode
->rn_ReqWindow
->UserPort
, &msg
.ExecMessage
);
94 if (sig
!= SIGB_SINGLE
) FreeSignal(sig
);
96 } /* if (reqnode->rn_ReqWindow) */
100 ReleaseSemaphore(&(ASLB(AslBase
)->ReqListSem
));
105 } /* AbortAslRequest */