#define BIT_ARRAY_BYTES(n) (4*BIT_ARRAY_WORDS(n))
#define BIT_ARRAY(name,size) u32 name[BIT_ARRAY_WORDS(size)]
-static inline bitarray_t
-bit_array_xmalloc(uns n)
+static inline bitarray_t bit_array_xmalloc(uns n)
{
return xmalloc(BIT_ARRAY_BYTES(n));
}
bitarray_t bit_array_xrealloc(bitarray_t a, uns old_n, uns new_n);
-static inline bitarray_t
-bit_array_xmalloc_zero(uns n)
+static inline bitarray_t bit_array_xmalloc_zero(uns n)
{
return xmalloc_zero(BIT_ARRAY_BYTES(n));
}
-static inline void
-bit_array_zero(bitarray_t a, uns n)
+static inline void bit_array_zero(bitarray_t a, uns n)
{
bzero(a, BIT_ARRAY_BYTES(n));
}
-static inline void
-bit_array_set_all(bitarray_t a, uns n)
+static inline void bit_array_set_all(bitarray_t a, uns n)
{
uns w = n / 32;
memset(a, 255, w * 4);
a[w] = (1U << m) - 1;
}
-static inline void
-bit_array_set(bitarray_t a, uns i)
+static inline void bit_array_set(bitarray_t a, uns i)
{
a[i/32] |= (1 << (i%32));
}
-static inline void
-bit_array_clear(bitarray_t a, uns i)
+static inline void bit_array_clear(bitarray_t a, uns i)
{
a[i/32] &= ~(1 << (i%32));
}
-static inline void
-bit_array_assign(bitarray_t a, uns i, uns x)
+static inline void bit_array_assign(bitarray_t a, uns i, uns x)
{
if (x)
bit_array_set(a, i);
bit_array_clear(a, i);
}
-static inline uns
-bit_array_isset(bitarray_t a, uns i)
+static inline uns bit_array_isset(bitarray_t a, uns i)
{
return a[i/32] & (1 << (i%32));
}
-static inline uns
-bit_array_get(bitarray_t a, uns i)
+static inline uns bit_array_get(bitarray_t a, uns i)
{
return !! bit_array_isset(a, i);
}
-static inline uns
-bit_array_test_and_set(bitarray_t a, uns i)
+static inline uns bit_array_test_and_set(bitarray_t a, uns i)
{
uns t = bit_array_isset(a, i);
bit_array_set(a, i);
return t;
}
-static inline uns
-bit_array_test_and_clear(bitarray_t a, uns i)
+static inline uns bit_array_test_and_clear(bitarray_t a, uns i)
{
uns t = bit_array_isset(a, i);
bit_array_clear(a, i);
};
/* conf-ctxt.c */
-static inline struct cf_context *
-cf_get_context(void)
+static inline struct cf_context *cf_get_context(void)
{
struct cf_context *cc = ucwlib_thread_context()->cf_context;
ASSERT(cc->is_active);
void bput_utf8_slow(struct fastbuf *b, uns u);
void bput_utf8_32_slow(struct fastbuf *b, uns u);
-static inline int
-bget_utf8_repl(struct fastbuf *b, uns repl)
+static inline int bget_utf8_repl(struct fastbuf *b, uns repl)
{
uns u;
if (bavailr(b) >= 3)
return bget_utf8_slow(b, repl);
}
-static inline int
-bget_utf8_32_repl(struct fastbuf *b, uns repl)
+static inline int bget_utf8_32_repl(struct fastbuf *b, uns repl)
{
uns u;
if (bavailr(b) >= 6)
void bput_utf16_be_slow(struct fastbuf *b, uns u);
void bput_utf16_le_slow(struct fastbuf *b, uns u);
-static inline int
-bget_utf16_be_repl(struct fastbuf *b, uns repl)
+static inline int bget_utf16_be_repl(struct fastbuf *b, uns repl)
{
uns u;
if (bavailr(b) >= 4)
return bget_utf16_be_slow(b, repl);
}
-static inline int
-bget_utf16_le_repl(struct fastbuf *b, uns repl)
+static inline int bget_utf16_le_repl(struct fastbuf *b, uns repl)
{
uns u;
if (bavailr(b) >= 4)
**/
void main_debug_context(struct main_context *m);
-static inline void
-main_debug(void)
+static inline void main_debug(void)
{
main_debug_context(main_current());
}
void *mp_grow_internal(struct mempool *pool, uns size);
void *mp_spread_internal(struct mempool *pool, void *p, uns size);
-static inline uns
-mp_idx(struct mempool *pool, void *ptr)
+static inline uns mp_idx(struct mempool *pool, void *ptr)
{
return ptr == pool->last_big;
}
ucw_off_t partmap_size(struct partmap *p);
void partmap_load(struct partmap *p, ucw_off_t start, uns size);
-static inline void *
-partmap_map(struct partmap *p, ucw_off_t start, uns size UNUSED)
+static inline void *partmap_map(struct partmap *p, ucw_off_t start, uns size UNUSED)
{
#ifndef CONFIG_UCW_PARTMAP_IS_MMAP
if (unlikely(!p->start_map || start < p->start_off || (ucw_off_t) (start+size) > p->end_off))
return p->start_map + (start - p->start_off);
}
-static inline void *
-partmap_map_forward(struct partmap *p, ucw_off_t start, uns size UNUSED)
+static inline void *partmap_map_forward(struct partmap *p, ucw_off_t start, uns size UNUSED)
{
#ifndef CONFIG_UCW_PARTMAP_IS_MMAP
if (unlikely((ucw_off_t) (start+size) > p->end_off))
/* In Darwin, sem_init() is unfortunately not implemented and the guide
* recommends emulating it using sem_open(). */
-static inline sem_t *
-sem_alloc(void)
+static inline sem_t *sem_alloc(void)
{
char buf[TEMP_FILE_NAME_LEN];
int mode, retry = 10;
return sem;
}
-static inline void
-sem_free(sem_t *sem)
+static inline void sem_free(sem_t *sem)
{
sem_close(sem);
}
#else
-static inline sem_t *
-sem_alloc(void)
+static inline sem_t *sem_alloc(void)
{
sem_t *sem = xmalloc(sizeof(sem_t));
int res = sem_init(sem, 0, 0);
return sem;
}
-static inline void
-sem_free(sem_t *sem)
+static inline void sem_free(sem_t *sem)
{
sem_destroy(sem);
xfree(sem);