From 9f3367b7da2bb70408c321d700620a759f686fcd Mon Sep 17 00:00:00 2001 From: dreid Date: Wed, 6 Jun 2001 18:12:14 +0000 Subject: This is a much larger commit than I meant to have, but a lot has been changed in my tree today :) - remove the sms code I committed yesterday - add an apr_pool_t to the sms structure - add locking code to the tracking sms This threw up an issue with locking, so next - change the locking code to add an owner and ref counting so we can lock multiple times from the same thread. this was needed by the apr_sms_tracking_reset code where we lock and then call free which locks again... I haven't added the locking changes for os2 or win32 after the problems I created with my last commit :) Changes to testlock on the way. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61716 13f79535-47bb-0310-9956-ffa450edef68 --- acconfig.h | 42 ------------------------------------------ 1 file changed, 42 deletions(-) (limited to 'acconfig.h') diff --git a/acconfig.h b/acconfig.h index 8cc5284a4..b238713b5 100644 --- a/acconfig.h +++ b/acconfig.h @@ -67,46 +67,4 @@ #define apr_sigwait(a,b) sigwait((a),(b)) #endif -/* Macros to deal with using either a pool or an sms - * to do memory stuff... - */ -#define APR_CLEANUP_REGISTER(struct, data, func, scope) \ - if (struct->pool) { \ - apr_pool_cleanup_register(struct->pool, data, func, scope); \ - } else { \ - apr_sms_cleanup_register(struct->mem_sys, APR_CHILD_CLEANUP, \ - data, func); \ - } - -#define APR_CLEANUP_REMOVE(struct, data, func) \ - if (struct->pool) { \ - apr_pool_cleanup_kill(struct->pool, data, func); \ - } else { \ - apr_sms_cleanup_unregister(struct->mem_sys, APR_CHILD_CLEANUP, \ - data, func); \ - } - -#define APR_MEM_PSTRDUP(struct, ptr, str) \ - if (struct->pool) { \ - ptr = apr_pstrdup(struct->pool, str); \ - } else { \ - size_t len = strlen(str) + 1; \ - ptr = (char*) apr_sms_calloc(struct->mem_sys, len); \ - memcpy(ptr, str, len); \ - } - -#define APR_MEM_MALLOC(ptr, struct, type) \ - if (struct->pool) { \ - ptr = (type *)apr_palloc(struct->pool, sizeof(type)); \ - } else { \ - ptr = (type *)apr_sms_malloc(struct->mem_sys, sizeof(type)); \ - } - -#define APR_MEM_CALLOC(ptr, struct, type) \ - if (struct->pool) { \ - ptr = (type *)apr_pcalloc(struct->pool, sizeof(type)); \ - } else { \ - ptr = (type *)apr_sms_calloc(struct->mem_sys, sizeof(type)); \ - } - #endif /* APR_PRIVATE_H */ -- cgit v1.2.1