2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
9 #include "datatypes_intern.h"
10 #include <datatypes/datatypes.h>
11 #include <proto/exec.h>
13 /*****************************************************************************
16 #include <proto/datatypes.h>
18 AROS_LH1(VOID
, LockDataType
,
21 AROS_LHA(struct DataType
*, dt
, A0
),
24 struct Library
*, DataTypesBase
, 40, DataTypes
)
28 Lock a DataType structure obtained from ObtainDataTypeA() or a data type
29 object (DTA_DataType).
33 dt -- DataType structure; may be NULL
39 Calls to LockDataType() and ObtainDataTypeA() must have a corresponding
40 ReleaseDataType() call or else problems will arise.
48 ObtainDataTypeA(), ReleaseDataType()
54 2.8.99 SDuvan implemented
56 *****************************************************************************/
60 if(dt
== NULL
|| dt
->dtn_Length
== 0)
63 ObtainSemaphoreShared(&(GPB(DataTypesBase
)->dtb_DTList
)->dtl_Lock
);
65 ((struct CompoundDataType
*)dt
)->OpenCount
++;
67 ReleaseSemaphore(&(GPB(DataTypesBase
)->dtb_DTList
)->dtl_Lock
);