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.
59
2003/03/17 13:
47
:
20
grubba Exp $
+
|| $Id: block_alloc.h,v 1.
60
2003/03/17 13:
57
:
16
grubba Exp $
*/ #undef 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 #undef COUNT_BLOCK
pike.git/src/block_alloc.h:346:
size_t PIKE_CONCAT(DATA,_hash_table_magnitude)=0; \ static size_t PIKE_CONCAT(num_,DATA)=0; \ \ static inline struct DATA * \ PIKE_CONCAT3(really_low_find_,DATA,_unlocked)(void *ptr, size_t hval) \ { \ struct DATA *p,**pp; \ p=PIKE_CONCAT(DATA,_hash_table)[hval]; \ if(!p || p->PTR_HASH_ALLOC_DATA == ptr) \ { \
-
DO_IF_RUN_UNLOCKED(mt_unlock(&PIKE_CONCAT(DATA,_mutex))); \
+
return p; \ } \ while((p=*(pp=&p->BLOCK_ALLOC_NEXT))) \ { \ if(p->PTR_HASH_ALLOC_DATA==ptr) \ { \ *pp=p->BLOCK_ALLOC_NEXT; \ p->BLOCK_ALLOC_NEXT=PIKE_CONCAT(DATA,_hash_table)[hval]; \ PIKE_CONCAT(DATA,_hash_table)[hval]=p; \ return p; \
pike.git/src/block_alloc.h:384:
return p; \ } \ \ static inline struct DATA * \ PIKE_CONCAT3(just_find_,DATA,_unlocked)(void *ptr, size_t hval) \ { \ struct DATA *p,**pp; \ p=PIKE_CONCAT(DATA,_hash_table)[hval]; \ if(!p || p->PTR_HASH_ALLOC_DATA == ptr) \ { \
-
DO_IF_RUN_UNLOCKED(mt_unlock(&PIKE_CONCAT(DATA,_mutex))); \
+
return p; \ } \ while((p=p->BLOCK_ALLOC_NEXT)) \ { \ if(p->PTR_HASH_ALLOC_DATA==ptr) return p; \ } \ return 0; \ } \ \ static struct DATA *PIKE_CONCAT(just_find_,DATA)(void *ptr) \