Fix IO memory access .. SB128 driver makes noises in VMWare - CMI is untested (Curren...
[AROS.git] / rom / exec / childfree.c
blob5fe342cc007964cc764ea421d549a44960f5108a
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(ULONG, 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 Forbid();
55 et = FindChild(tid);
56 if(et != NULL)
58 Remove((struct Node *)et);
60 if(et->et_Result2)
61 FreeVec(et->et_Result2);
63 #ifdef DEBUG_ETASK
64 FreeVec(IntETask(et)->iet_Me);
65 #endif
66 FreeVec(et);
68 Permit();
70 AROS_LIBFUNC_EXIT
71 } /* ChildFree */