ICU 4.2.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
uclean.h
Go to the documentation of this file.
1 /*
2 ******************************************************************************
3 * *
4 * Copyright (C) 2001-2005, International Business Machines *
5 * Corporation and others. All Rights Reserved. *
6 * *
7 ******************************************************************************
8 * file name: uclean.h
9 * encoding: US-ASCII
10 * tab size: 8 (not used)
11 * indentation:4
12 *
13 * created on: 2001July05
14 * created by: George Rhoten
15 */
16 
17 #ifndef __UCLEAN_H__
18 #define __UCLEAN_H__
19 
20 #include "unicode/utypes.h"
68 U_STABLE void U_EXPORT2
69 u_init(UErrorCode *status);
70 
116 U_STABLE void U_EXPORT2
117 u_cleanup(void);
118 
119 
120 
121 
129 typedef void *UMTX;
130 
147 typedef void U_CALLCONV UMtxInitFn (const void *context, UMTX *mutex, UErrorCode* status);
148 
149 
159 typedef void U_CALLCONV UMtxFn (const void *context, UMTX *mutex);
160 
161 
181 U_STABLE void U_EXPORT2
182 u_setMutexFunctions(const void *context, UMtxInitFn *init, UMtxFn *destroy, UMtxFn *lock, UMtxFn *unlock,
183  UErrorCode *status);
184 
185 
194 typedef int32_t U_CALLCONV UMtxAtomicFn(const void *context, int32_t *p);
195 
211 U_STABLE void U_EXPORT2
212 u_setAtomicIncDecFunctions(const void *context, UMtxAtomicFn *inc, UMtxAtomicFn *dec,
213  UErrorCode *status);
214 
215 
216 
225 typedef void *U_CALLCONV UMemAllocFn(const void *context, size_t size);
234 typedef void *U_CALLCONV UMemReallocFn(const void *context, void *mem, size_t size);
245 typedef void U_CALLCONV UMemFreeFn (const void *context, void *mem);
246 
263 U_STABLE void U_EXPORT2
264 u_setMemoryFunctions(const void *context, UMemAllocFn *a, UMemReallocFn *r, UMemFreeFn *f,
265  UErrorCode *status);
266 
267 #endif
void * UMemReallocFn(const void *context, void *mem, size_t size)
Pointer type for a user supplied memory re-allocation function.
Definition: uclean.h:234
void * UMemAllocFn(const void *context, size_t size)
Pointer type for a user supplied memory allocation function.
Definition: uclean.h:225
#define U_CALLCONV
Similar to U_CDECL_BEGIN/U_CDECL_END, this qualifier is necessary in callback function typedefs to ma...
Definition: utypes.h:254
void u_setAtomicIncDecFunctions(const void *context, UMtxAtomicFn *inc, UMtxAtomicFn *dec, UErrorCode *status)
Set the functions that ICU will use for atomic increment and decrement of int32_t values...
void u_setMutexFunctions(const void *context, UMtxInitFn *init, UMtxFn *destroy, UMtxFn *lock, UMtxFn *unlock, UErrorCode *status)
Set the functions that ICU will use for mutex operations Use of this function is optional; by default...
void u_cleanup(void)
Clean up the system resources, such as allocated memory or open files, used in all ICU libraries...
void UMtxFn(const void *context, UMTX *mutex)
Function Pointer type for a user supplied mutex functions.
Definition: uclean.h:159
#define U_EXPORT2
Definition: platform.h:338
int32_t UMtxAtomicFn(const void *context, int32_t *p)
Pointer type for a user supplied atomic increment or decrement function.
Definition: uclean.h:194
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
Definition: utypes.h:593
void UMemFreeFn(const void *context, void *mem)
Pointer type for a user supplied memory free function.
Definition: uclean.h:245
Basic definitions for ICU, for both C and C++ APIs.
void u_setMemoryFunctions(const void *context, UMemAllocFn *a, UMemReallocFn *r, UMemFreeFn *f, UErrorCode *status)
Set the functions that ICU will use for memory allocation.
void u_init(UErrorCode *status)
Initialize ICU.
signed int int32_t
Define 64 bit limits.
Definition: pwin32.h:143
#define U_STABLE
This is used to declare a function as a stable public ICU C API.
Definition: umachine.h:117
void * UMTX
An opaque pointer type that represents an ICU mutex.
Definition: uclean.h:129
void UMtxInitFn(const void *context, UMTX *mutex, UErrorCode *status)
Function Pointer type for a user supplied mutex initialization function.
Definition: uclean.h:147