2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
5 Desc: Remove a library from the list of public libraries.
8 #include <aros/config.h>
9 #include <exec/execbase.h>
10 #include <aros/libcall.h>
12 #include <proto/exec.h>
14 #include "exec_debug.h"
15 #ifndef DEBUG_RemLibrary
16 # define DEBUG_RemLibrary 0
22 #include <aros/debug.h>
25 /*****************************************************************************
29 AROS_LH1(void, RemLibrary
,
32 AROS_LHA(struct Library
*, library
,A1
),
35 struct ExecBase
*, SysBase
, 67, Exec
)
38 Calls the given library's expunge vector, thus trying to delete it.
39 The library may refuse to do so and still be open after this call.
42 library - Pointer to the library structure.
53 AddLibrary(), MakeLibrary(), MakeFunctions(), InitStruct(), SumLibrary()
57 ******************************************************************************/
62 D(bug("RemLibrary $%lx (\"%s\") by \"%s\"\n", library
,
63 library
? library
->lib_Node
.ln_Name
: "(null)",
64 SysBase
->ThisTask
->tc_Node
.ln_Name
));
66 /* Arbitrate for the library list */
69 /* Call expunge vector */
70 seglist
= AROS_LVO_CALL1(BPTR
,
71 AROS_LCA(struct Library
*, library
, D0
),
72 struct Library
*,library
,3,);
74 Normally you'd expect the library to be expunged if this returns
75 non-zero, but this is only exec which doesn't know anything about
76 seglists - therefore dos.library has to SetFunction() into this
77 vector for the additional functionality.
83 AROS_COMPAT_SETD0(seglist
);