2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
5 Desc: AttemptRemNamedObject() - attempt to remove a NamedObject
10 /*****************************************************************************
13 #include <proto/utility.h>
15 AROS_LH1(LONG
, AttemptRemNamedObject
,
18 AROS_LHA(struct NamedObject
*, object
, A0
),
21 struct Library
*, UtilityBase
, 39, Utility
)
24 Checks to see whether a NamedObject can be removed. If the object
25 is in use, or in the process of being removed, this function will
26 return a failure code. If the object can be removed, this function
27 will remove it and the object will be available for freeing.
28 You must have previously have called FindNamedObject() on this
32 object - NamedObject to attempt to remove. The address of the
33 NameSpace is contained within the NamedObject.
36 If the NamedObject can be removed, then it will be removed from
37 the list. Otherwise the routine will just return.
39 If the NamedObject has a removal message associated with it that
40 message will be returned to the owner of the NamedObject.
49 utility/name.h, RemNamedObject(), AddNamedObject()
54 29-10-95 digulla automatically created from
55 utility_lib.fd and clib/utility_protos.h
56 11-08-96 iaint Adapted from stuff I did.
58 *****************************************************************************/
62 struct IntNamedObject
*no
= GetIntNamedObject(object
);
64 if(no
->no_UseCount
> 1)
70 RemNamedObject( object
, NULL
);
76 } /* AttemptRemNamedObject */