X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=include%2Fyaz%2Fnmem.h;h=0f5bf4c8e91747975d876416898d5adc59324f72;hb=450b277660d870fa36aed2fdfbf88affa190ae96;hp=44d1cf85287ebb2f5a329bd2bf348a75b6ee91f7;hpb=8d08fd5b79e49e14ca014de8e6bed12a2cc0468d;p=yaz-moved-to-github.git diff --git a/include/yaz/nmem.h b/include/yaz/nmem.h index 44d1cf8..0f5bf4c 100644 --- a/include/yaz/nmem.h +++ b/include/yaz/nmem.h @@ -24,7 +24,17 @@ * OF THIS SOFTWARE. * * $Log: nmem.h,v $ - * Revision 1.5 2001-03-25 21:55:12 adam + * Revision 1.8 2002-09-25 12:37:07 adam + * Thread-safe handling of errno variable. + * For server option -a@ produces APDU prints in YAZ log. + * + * Revision 1.7 2002/09/10 18:41:18 adam + * Added yaz_errno + * + * Revision 1.6 2001/06/26 14:11:27 adam + * Added MUTEX functions for NMEM module (used by OID utility). + * + * Revision 1.5 2001/03/25 21:55:12 adam * Added odr_intdup. Ztest server returns TaskPackage for ItemUpdate. * * Revision 1.4 2000/05/09 11:48:58 adam @@ -83,6 +93,12 @@ typedef struct nmem_control struct nmem_control *next; } nmem_control; +typedef struct nmem_mutex *NMEM_MUTEX; +YAZ_EXPORT void nmem_mutex_create(NMEM_MUTEX *); +YAZ_EXPORT void nmem_mutex_enter(NMEM_MUTEX); +YAZ_EXPORT void nmem_mutex_leave(NMEM_MUTEX); +YAZ_EXPORT void nmem_mutex_destroy(NMEM_MUTEX *); + typedef struct nmem_control *NMEM; YAZ_EXPORT void nmem_reset(NMEM n); @@ -117,6 +133,8 @@ YAZ_EXPORT void *nmem_malloc(NMEM n, int size); YAZ_EXPORT void nmem_init (void); YAZ_EXPORT void nmem_exit (void); +YAZ_EXPORT int yaz_errno (void); +YAZ_EXPORT void yaz_set_errno (int v); YAZ_END_CDECL