pike.git / src / block_alloc.h

version» Context lines:

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.72 2004/05/31 23:51:28 nilsson Exp $ + || $Id: block_alloc.h,v 1.73 2004/06/02 00:07:20 nilsson 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:46:   #ifndef PIKE_HASH_T   #define PIKE_HASH_T size_t   #endif /* !PIKE_HASH_T */      #ifdef PIKE_RUN_UNLOCKED   #include "threads.h"      /* Block Alloc UnLocked */   #define BA_UL(X) PIKE_CONCAT(X,_unlocked)   #define BA_STATIC static - #define BA_INLINE inline + #define BA_INLINE INLINE   #else   #define BA_UL(X) X   #define BA_STATIC   #define BA_INLINE   #endif      #define BLOCK_ALLOC_FILL_PAGES(DATA, PAGES) \    BLOCK_ALLOC(DATA, \    ((PIKE_MALLOC_PAGE_SIZE * (PAGES)) \    - PIKE_MALLOC_OVERHEAD - BLOCK_HEADER_SIZE) / \
pike.git/src/block_alloc.h:360:      #define LOW_PTR_HASH_ALLOC(DATA,BSIZE) \    \   BLOCK_ALLOC(DATA,BSIZE) \    \   struct DATA **PIKE_CONCAT(DATA,_hash_table)=0; \   size_t PIKE_CONCAT(DATA,_hash_table_size)=0; \   size_t PIKE_CONCAT(DATA,_hash_table_magnitude)=0; \   static size_t PIKE_CONCAT(num_,DATA)=0; \    \ - static inline struct DATA * \ + static INLINE struct DATA * \    PIKE_CONCAT3(really_low_find_,DATA,_unlocked)(void *ptr, \    PIKE_HASH_T hval) \   { \    struct DATA *p,**pp; \    p=PIKE_CONCAT(DATA,_hash_table)[hval]; \    if(!p || p->PTR_HASH_ALLOC_DATA == ptr) \    { \    return p; \    } \    while((p=*(pp=&p->BLOCK_ALLOC_NEXT))) \
pike.git/src/block_alloc.h:398:    if(!PIKE_CONCAT(DATA,_hash_table_size)) { \    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 * \ + static INLINE struct DATA * \    PIKE_CONCAT3(just_find_,DATA,_unlocked)(void *ptr, \    PIKE_HASH_T hval) \   { \    struct DATA *p,**pp; \    p=PIKE_CONCAT(DATA,_hash_table)[hval]; \    if(!p || p->PTR_HASH_ALLOC_DATA == ptr) \    { \    return p; \    } \    while((p=p->BLOCK_ALLOC_NEXT)) \