michael@0: /* michael@0: ********************************************************************** michael@0: * Copyright (C) 2013, International Business Machines michael@0: * Corporation and others. All Rights Reserved. michael@0: ********************************************************************** michael@0: * michael@0: * File cmutex.h michael@0: * michael@0: * Minimal plain C declarations for ICU mutex functions. michael@0: * This header provides a transition path for plain C files that michael@0: * formerly included mutex.h, which is now a C++ only header. michael@0: * michael@0: * This header should not be used for new code. michael@0: * michael@0: * C++ files should include umutex.h, not this header. michael@0: * michael@0: */ michael@0: michael@0: #ifndef __CMUTEX_H__ michael@0: #define __CMUTEX_H__ michael@0: michael@0: typedef struct UMutex UMutex; michael@0: michael@0: michael@0: /* Lock a mutex. michael@0: * @param mutex The given mutex to be locked. Pass NULL to specify michael@0: * the global ICU mutex. Recursive locks are an error michael@0: * and may cause a deadlock on some platforms. michael@0: */ michael@0: U_INTERNAL void U_EXPORT2 umtx_lock(UMutex* mutex); michael@0: michael@0: /* Unlock a mutex. michael@0: * @param mutex The given mutex to be unlocked. Pass NULL to specify michael@0: * the global ICU mutex. michael@0: */ michael@0: U_INTERNAL void U_EXPORT2 umtx_unlock (UMutex* mutex); michael@0: michael@0: #endif michael@0: