2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
5 Desc: Add a class to the list of puvlic classes
8 #include <exec/lists.h>
9 #include <proto/exec.h>
12 /*****************************************************************************
15 #include <proto/oop.h>
17 AROS_LH1(VOID
, OOP_AddClass
,
20 AROS_LHA(OOP_Class
*, classPtr
, A0
),
23 struct Library
*, OOPBase
, 8, OOP
)
26 Adds a class to the public list of classes.
27 This means that any process can create objects of this
31 classPtr - Pointer to the class to make public.
41 Would be faster to use a hashtable to look up class IDs
49 29-10-95 digulla automatically created from
50 intuition_lib.fd and clib/intuition_protos.h
52 *****************************************************************************/
55 AROS_LIBBASE_EXT_DECL(struct Library
*,OOPBase
)
60 ObtainSemaphore( &GetOBase(OOPBase
)->ob_ClassListLock
);
62 AddTail((struct List
*)&GetOBase(OOPBase
)->ob_ClassList
63 ,(struct Node
*)classPtr
);
65 ReleaseSemaphore( & GetOBase(OOPBase
)->ob_ClassListLock
);