pike.git
/
src
/
block_alloc.h
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/block_alloc.h:1:
/* || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information.
-
|| $Id: block_alloc.h,v 1.
71
2004
/
04/
03
15
:
55
:
15
mast Exp $
+
|| $Id: block_alloc.h,v 1.
72
2006
/
03
/
10
05
:
42
:
53
mast Exp $
*/ #undef PRE_INIT_BLOCK #undef DO_PRE_INIT_BLOCK #undef INIT_BLOCK #undef EXIT_BLOCK #undef BLOCK_ALLOC #undef LOW_PTR_HASH_ALLOC #undef PTR_HASH_ALLOC_FIXED #undef PTR_HASH_ALLOC
pike.git/src/block_alloc.h:388:
} \ } \ return 0; \ } \ \ struct DATA *PIKE_CONCAT(find_,DATA)(void *ptr) \ { \ struct DATA *p; \ PIKE_HASH_T hval = (PIKE_HASH_T)PTR_TO_INT(ptr); \ DO_IF_RUN_UNLOCKED(mt_lock(&PIKE_CONCAT(DATA,_mutex))); \
-
if(!PIKE_CONCAT(DATA,_hash_table
_size
)) { \
+
if(!PIKE_CONCAT(DATA,_hash_table)) {
\
DO_IF_RUN_UNLOCKED(mt_unlock(&PIKE_CONCAT(DATA,_mutex))); \ return 0; \ } \ hval %= (PIKE_HASH_T)PIKE_CONCAT(DATA,_hash_table_size); \ p=PIKE_CONCAT3(really_low_find_,DATA,_unlocked)(ptr, hval); \ DO_IF_RUN_UNLOCKED(mt_unlock(&PIKE_CONCAT(DATA,_mutex))); \ return p; \ } \ \ static inline struct DATA * \
pike.git/src/block_alloc.h:420:
if(p->PTR_HASH_ALLOC_DATA==ptr) return p; \ } \ return 0; \ } \ \ static struct DATA *PIKE_CONCAT(just_find_,DATA)(void *ptr) \ { \ struct DATA *p; \ PIKE_HASH_T hval = (PIKE_HASH_T)PTR_TO_INT(ptr); \ DO_IF_RUN_UNLOCKED(mt_lock(&PIKE_CONCAT(DATA,_mutex))); \
-
if(!PIKE_CONCAT(DATA,_hash_table
_size
)) { \
+
if(!PIKE_CONCAT(DATA,_hash_table)) {
\
DO_IF_RUN_UNLOCKED(mt_unlock(&PIKE_CONCAT(DATA,_mutex))); \ return 0; \ } \ hval %= (PIKE_HASH_T)PIKE_CONCAT(DATA,_hash_table_size); \ p=PIKE_CONCAT3(just_find_,DATA,_unlocked)(ptr, hval); \ DO_IF_RUN_UNLOCKED(mt_unlock(&PIKE_CONCAT(DATA,_mutex))); \ return p; \ } \ \ \