10#ifndef __L4UTIL__INCLUDE__SPLITLOG2_H__
11#define __L4UTIL__INCLUDE__SPLITLOG2_H__
13#include <l4/sys/linkage.h>
63 if ((retval = handler(start, chunk_end, len2)))
67 start = chunk_end + 1;
74 int start_bits = l4util_bsf(start);
76 int len_bits = len ? l4util_bsr(len) : (int)(
sizeof(
l4_addr_t) * 8 - 1);
77 if (start_bits != -1 && len_bits > start_bits)
78 len_bits = start_bits;
bit manipulation functions
unsigned long l4_addr_t
Address type.
@ L4_EINVAL
Invalid argument.
#define L4_INLINE
L4 Inline function attribute.
#define L4_BEGIN_DECLS
Start section with C types and functions.
#define L4_END_DECLS
End section with C types and functions.
l4_addr_t l4util_splitlog2_size(l4_addr_t start, l4_addr_t end)
Return log2 base and size aligned length of a range.
L4_BEGIN_DECLS long l4util_splitlog2_hdl(l4_addr_t start, l4_addr_t end, long(*handler)(l4_addr_t s, l4_addr_t e, int log2size))
Split a range into log2 base and size aligned chunks.