2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
9 /*****************************************************************************
14 #include <proto/exec.h>
15 #include <proto/commodities.h>
16 #include <libraries/commodities.h>
18 AROS_LH2(VOID
, EnqueueCxObj
,
22 AROS_LHA(CxObj
*, headObj
, A0
),
23 AROS_LHA(CxObj
*, co
, A1
),
27 struct Library
*, CxBase
, 15, Commodities
)
31 Insert commodity object 'co' into the list of objects connected to
32 'headObj' according to the priority of 'co'. (The priority of an object
33 can be set by the function SetCxObjPri().)
37 headObj - the object to which 'co' shall be inserted.
38 co - a pointer to a commodity object
42 If 'headObj' is NULL, the object 'co' and all objects connected to it
43 are deleted. If 'co' is NULL and 'headObj' is a valid object, the
44 latter's accumulated error will be adjusted to incorporate
49 For nodes with equal priority, this function inserts object like within
58 SetCxObjPri(), CxObjError(), ClearCxObjError(),
59 <libraries/commodities.h>
65 *****************************************************************************/
79 headObj
->co_Error
|= COERR_NULLATTACH
;
84 ObtainSemaphore(&GPB(CxBase
)->cx_SignalSemaphore
);
86 Enqueue((struct List
*)&headObj
->co_ObjList
, &co
->co_Node
);
87 co
->co_Flags
|= COF_VALID
;
89 ReleaseSemaphore(&GPB(CxBase
)->cx_SignalSemaphore
);