add place-holder directory for the a3000 wd533c93 scsi controller implementation.
[AROS.git] / workbench / libs / asl / abortaslrequest.c
blob6959a9301f0bb7f8bebb3256e21cf3556e5830f4
1 /*
2 Copyright © 1995-2017, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: english
7 */
10 #include <proto/exec.h>
11 #include "asl_intern.h"
13 #include <string.h>
15 /*****************************************************************************
17 NAME */
19 AROS_LH1(void, AbortAslRequest,
21 /* SYNOPSIS */
22 AROS_LHA(APTR, requester, A0),
24 /* LOCATION */
25 struct Library *, AslBase, 13, Asl)
27 /* FUNCTION
29 INPUTS
31 RESULT
33 NOTES
35 EXAMPLE
37 BUGS
39 SEE ALSO
41 INTERNALS
43 HISTORY
44 27-11-96 digulla automatically created from
45 asl_lib.fd and clib/asl_protos.h
47 *****************************************************************************/
49 AROS_LIBFUNC_INIT
51 struct ReqNode *reqnode;
53 if (!requester) return;
55 ObtainSemaphore( &(ASLB(AslBase)->ReqListSem));
57 reqnode = FindReqNode(requester, ASLB(AslBase));
58 if (reqnode)
60 if (reqnode->rn_ReqWindow)
62 struct MsgPort mp;
63 struct IntuiMessage msg;
64 BYTE sig;
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);
73 mp.mp_SigBit = sig;
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;
80 msg.Code = 0;
81 msg.Qualifier = 0;
82 msg.IAddress = reqnode->rn_ReqWindow;
83 msg.MouseX = 0;
84 msg.MouseY = 0;
85 msg.Seconds = 0;
86 msg.Micros = 0;
87 msg.IDCMPWindow = reqnode->rn_ReqWindow;
88 msg.SpecialLink = 0;
90 SetSignal(0, 1L << sig);
91 PutMsg(reqnode->rn_ReqWindow->UserPort, &msg.ExecMessage);
92 WaitPort(&mp);
94 if (sig != SIGB_SINGLE) FreeSignal(sig);
96 } /* if (reqnode->rn_ReqWindow) */
98 } /* if (reqnode) */
100 ReleaseSemaphore(&(ASLB(AslBase)->ReqListSem));
103 AROS_LIBFUNC_EXIT
105 } /* AbortAslRequest */