1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/intl/icu/source/common/cmutex.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,39 @@ 1.4 +/* 1.5 +********************************************************************** 1.6 +* Copyright (C) 2013, International Business Machines 1.7 +* Corporation and others. All Rights Reserved. 1.8 +********************************************************************** 1.9 +* 1.10 +* File cmutex.h 1.11 +* 1.12 +* Minimal plain C declarations for ICU mutex functions. 1.13 +* This header provides a transition path for plain C files that 1.14 +* formerly included mutex.h, which is now a C++ only header. 1.15 +* 1.16 +* This header should not be used for new code. 1.17 +* 1.18 +* C++ files should include umutex.h, not this header. 1.19 +* 1.20 +*/ 1.21 + 1.22 +#ifndef __CMUTEX_H__ 1.23 +#define __CMUTEX_H__ 1.24 + 1.25 +typedef struct UMutex UMutex; 1.26 + 1.27 + 1.28 +/* Lock a mutex. 1.29 + * @param mutex The given mutex to be locked. Pass NULL to specify 1.30 + * the global ICU mutex. Recursive locks are an error 1.31 + * and may cause a deadlock on some platforms. 1.32 + */ 1.33 +U_INTERNAL void U_EXPORT2 umtx_lock(UMutex* mutex); 1.34 + 1.35 +/* Unlock a mutex. 1.36 + * @param mutex The given mutex to be unlocked. Pass NULL to specify 1.37 + * the global ICU mutex. 1.38 + */ 1.39 +U_INTERNAL void U_EXPORT2 umtx_unlock (UMutex* mutex); 1.40 + 1.41 +#endif 1.42 +