Corrected invalid characters.
[tangerine.git] / rom / dos / abortpkt.c
blob31f17d2b20db622d8af33828efdb1de6fc2e23ce
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: english
7 */
8 #include "dos_intern.h"
9 #include <proto/exec.h>
11 /*****************************************************************************
13 NAME */
14 #include <dos/dosextens.h>
15 #include <proto/dos.h>
17 AROS_LH2(void, AbortPkt,
19 /* SYNOPSIS */
20 AROS_LHA(struct MsgPort *, port, D1),
21 AROS_LHA(struct DosPacket *, pkt, D2),
23 /* LOCATION */
24 struct DosLibrary *, DOSBase, 44, Dos)
26 /* FUNCTION
27 Tries to abort an asynchronous packet. There is no guarantee
28 that this succeeds. You must wait for the packet to return
29 before you can reuse or deallocate it.
31 INPUTS
32 port - the message port to where the packet was sent
33 pkt - the packet to be aborted
35 RESULT
37 NOTES
39 EXAMPLE
41 BUGS
43 SEE ALSO
45 INTERNALS
47 *****************************************************************************/
49 AROS_LIBFUNC_INIT
51 if (NULL != (struct IORequest *)pkt->dp_Arg7) {
52 if (0 == AbortIO((struct IORequest*)pkt->dp_Arg7))
54 #warning Still have to decide where to finally free the IORequest structure if this goes well
55 FreeMem((APTR)pkt->dp_Arg7, sizeof(struct IOFileSys));
56 pkt->dp_Arg7 = NULL;
59 AROS_LIBFUNC_EXIT
60 } /* AbortPkt */