2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
9 /*****************************************************************************
14 #include <libraries/commodities.h>
15 #include <proto/exec.h>
16 #include <proto/commodities.h>
18 AROS_LH2(VOID
, AttachCxObj
,
22 AROS_LHA(CxObj
*, headObj
, A0
),
23 AROS_LHA(CxObj
*, co
, A1
),
27 struct Library
*, CxBase
, 14, Commodities
)
31 Add commodity object 'co' last in the list of objects of object
36 headObj - pointer to a list of commodity objects
37 co - the object to add to the list
42 If 'headObj' is NULL the entire tree of objects pointed to by 'co'
43 is deleted. If 'co' is NULL, this is recorded in the error field of
54 CxObjError(), ClearCxObjError()
60 ******************************************************************************/
74 headObj
->co_Error
|= COERR_NULLATTACH
;
79 ObtainSemaphore(&GPB(CxBase
)->cx_SignalSemaphore
);
81 AddTail((struct List
*)&headObj
->co_ObjList
, &co
->co_Node
);
82 co
->co_Flags
|= COF_VALID
;
84 ReleaseSemaphore(&GPB(CxBase
)->cx_SignalSemaphore
);
87 } /* AttachCxObject */