graphics.library: MakeVPort() RastInfo based double-buffering fixes
[AROS.git] / rom / exec / childfree.c
blob7d6cdbffc77ae3d43773398c6ec2f74dff9827bc
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 "etask.h"
10 #include <proto/exec.h>
12 /*****************************************************************************
14 NAME */
16 AROS_LH1(void, ChildFree,
18 /* SYNOPSIS */
19 AROS_LHA(ULONG, tid, D0),
21 /* LOCATION */
22 struct ExecBase *, SysBase, 123, Exec)
24 /* FUNCTION
25 Clean up after a child process.
27 INPUTS
28 tid -- Id of the child to clean up. This is not the same as
29 the Task pointer.
31 RESULT
32 The child will be freed.
34 NOTES
35 This function will work correctly only for child tasks that are
36 processes created with NP_NotifyOnDeath set to TRUE.
38 Calling ChildFree() on a running child is likely to crash your
39 system badly.
41 EXAMPLE
43 BUGS
45 SEE ALSO
47 INTERNALS
49 *****************************************************************************/
51 AROS_LIBFUNC_INIT
53 struct ETask *et;
55 Forbid();
56 et = FindChild(tid);
57 if(et != NULL)
59 Remove((struct Node *)et);
61 ExpungeETask(et);
63 Permit();
65 AROS_LIBFUNC_EXIT
66 } /* ChildFree */