2 Copyright © 1998-2001, The AROS Development Team. All rights reserved.
5 Desc: AllocMiscResource() function.
8 #include <resources/misc.h>
9 #include <proto/exec.h>
10 #include "misc_intern.h"
12 /*****************************************************************************
16 AROS_LH1(VOID
, FreeMiscResource
,
17 AROS_LHA(ULONG
, unitNum
, D0
),
21 APTR
, MiscBase
, 2, Misc
)
25 Frees one of the miscellaneous resources.
29 unitNum -- The resource to free.
35 You must have allocated the resource to free it!
49 23.7.98 SDuvan implemented
51 *****************************************************************************/
55 ObtainSemaphore(&GPB(MiscBase
)->mb_Lock
);
57 GPB(MiscBase
)->mb_owners
[unitNum
] = NULL
;
59 ReleaseSemaphore(&GPB(MiscBase
)->mb_Lock
);
62 } /* FreeMiscResource */