summaryrefslogtreecommitdiff
path: root/processor
diff options
context:
space:
mode:
authorXuefer <xuefer@gmail.com>2013-11-13 04:19:00 +0000
committerXuefer <xuefer@gmail.com>2013-11-13 04:19:00 +0000
commitba88593733c55a94c08a38f1b032f4e981732afa (patch)
tree7858eed4fb45cab3c2d22792e32cf4f17b932e83 /processor
parentfab2b53da67e06509db47c0f7f87edd6f0f868d1 (diff)
downloadxcache-ba88593733c55a94c08a38f1b032f4e981732afa.tar.gz
xcache-ba88593733c55a94c08a38f1b032f4e981732afa.zip
relocate: marco name PTR_FROM_VIRTUAL_EX
git-svn-id: svn://svn.lighttpd.net/xcache/trunk@1472 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
Diffstat (limited to 'processor')
-rw-r--r--processor/hashtable.m46
-rw-r--r--processor/main.m48
-rw-r--r--processor/struct.m42
3 files changed, 8 insertions, 8 deletions
diff --git a/processor/hashtable.m4 b/processor/hashtable.m4
index 93a0820..d76ee6a 100644
--- a/processor/hashtable.m4
+++ b/processor/hashtable.m4
@@ -74,7 +74,7 @@ define(`DEF_HASH_TABLE_FUNC', `DEF_STRUCT_P_FUNC(`HashTable', `$1', `
CALLOC(`DST(`arBuckets')', Bucket*, SRC(`nTableSize'))
DONE(arBuckets)
DISABLECHECK(`
- for (srcBucket = UNRELOCATED_EX(`Bucket', SRC(`pListHead')); srcBucket != NULL; srcBucket = UNRELOCATED_EX(`Bucket', `srcBucket->pListNext')) {
+ for (srcBucket = PTR_FROM_VIRTUAL_EX(`Bucket', SRC(`pListHead')); srcBucket != NULL; srcBucket = PTR_FROM_VIRTUAL_EX(`Bucket', `srcBucket->pListNext')) {
IFCALCCOPY(`bucketSize = BUCKET_SIZE(srcBucket);')
ALLOC(dstBucket, char, bucketSize, , Bucket)
IFCOPY(`
@@ -147,10 +147,10 @@ define(`DEF_HASH_TABLE_FUNC', `DEF_STRUCT_P_FUNC(`HashTable', `$1', `
IFRELOCATE(`
for (n = 0; n < SRC(`nTableSize'); ++n) {
if (SRC(`arBuckets[n]')) {
- next = UNRELOCATED_EX(`Bucket', `DST(`arBuckets[n]')');
+ next = PTR_FROM_VIRTUAL_EX(`Bucket', `DST(`arBuckets[n]')');
do {
dstBucket = next;
- next = UNRELOCATED_EX(`Bucket', `next->pNext');
+ next = PTR_FROM_VIRTUAL_EX(`Bucket', `next->pNext');
if (dstBucket->pListLast) {
RELOCATE_EX(Bucket, dstBucket->pListLast)
}
diff --git a/processor/main.m4 b/processor/main.m4
index c26d7e9..3a91abd 100644
--- a/processor/main.m4
+++ b/processor/main.m4
@@ -24,8 +24,8 @@ define(`DST', `ifelse(`$1', `', `dst', `dst->$1')')
dnl ============
define(`INDENT', `xc_dprint_indent(indent);')
dnl }}}
-dnl {{{ UNRELOCATED_EX(1:type, 2:elm)
-define(`UNRELOCATED_EX', `$2')
+dnl {{{ PTR_FROM_VIRTUAL_EX(1:type, 2:elm)
+define(`PTR_FROM_VIRTUAL_EX', `$2')
dnl }}}
dnl {{{ ALLOC(1:dst, 2:type, 3:count=1, 4:clean=false, 5:realtype=$2)
define(`ALLOC', `
@@ -262,13 +262,13 @@ popdef(`RELOCATE_EX')
REDEF(`PROCESSOR_TYPE', `restore') include(srcdir`/processor/processor.m4')
-pushdef(`UNRELOCATED_EX', `ptradd($1 *, notnullable($2), ptrdiff)')
+pushdef(`PTR_FROM_VIRTUAL_EX', `ptradd($1 *, notnullable($2), ptrdiff)')
pushdef(`RELOCATE_EX', `$2 = ptradd($1 *, notnullable($2), relocatediff);')
pushdef(`SRC', defn(`DST'))
REDEF(`PROCESSOR_TYPE', `relocate') include(srcdir`/processor/processor.m4')
popdef(`SRC')
popdef(`RELOCATE_EX')
-popdef(`UNRELOCATED_EX')
+popdef(`PTR_FROM_VIRTUAL_EX')
#ifdef HAVE_XCACHE_DPRINT
REDEF(`PROCESSOR_TYPE', `dprint') include(srcdir`/processor/processor.m4')
diff --git a/processor/struct.m4 b/processor/struct.m4
index cc6293e..7cd003e 100644
--- a/processor/struct.m4
+++ b/processor/struct.m4
@@ -148,7 +148,7 @@ ifdef(`DASM_STRUCT_DIRECT', `', `
IFSTORE( `processor, $6 $2, $6 $3')
IFRESTORE(`processor, $6 $2, $6 $3')
IFRELOCATE(`
- ifelse(`$6', `', `UNRELOCATED_EX(`$1', `$3')', `$6 $3')
+ ifelse(`$6', `', `PTR_FROM_VIRTUAL_EX(`$1', `$3')', `$6 $3')
, ptrdiff
, relocatediff
')