Updated PCI IDs to latest snapshot.
[tangerine.git] / rom / exec / childfree.c
blob54bef7d11cfd982a973579eb18414000194461a7
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Free child task information on a dead child.
6 */
7 #include "exec_intern.h"
8 #include "exec_util.h"
9 #include <proto/exec.h>
11 /*****************************************************************************
13 NAME */
15 AROS_LH1(void, ChildFree,
17 /* SYNOPSIS */
18 AROS_LHA(APTR, tid, D0),
20 /* LOCATION */
21 struct ExecBase *, SysBase, 123, Exec)
23 /* FUNCTION
24 Clean up after a child process.
26 INPUTS
27 tid -- Id of the child to clean up. This is not the same as
28 the Task pointer.
30 RESULT
31 The child will be freed.
33 NOTES
34 This function will work correctly only for child tasks that are
35 processes created with NP_NotifyOnDeath set to TRUE.
37 Calling ChildFree() on a running child is likely to crash your
38 system badly.
40 EXAMPLE
42 BUGS
44 SEE ALSO
46 INTERNALS
48 *****************************************************************************/
50 AROS_LIBFUNC_INIT
52 struct ETask *et;
54 et = FindChild((ULONG)tid);
55 if(et != NULL)
57 Remove((struct Node *)et);
59 if(et->et_Result2)
60 FreeVec(et->et_Result2);
62 #ifdef DEBUG_ETASK
63 FreeVec(IntETask(et)->iet_Me);
64 #endif
65 FreeVec(et);
68 AROS_LIBFUNC_EXIT
69 } /* ChildFree */