62 (uint64_t)&
obj->os_val);
105 fake_ptr = (
char *)&
obj->os_val;
107 cookie_test->
co_addr = (uint64_t)fake_ptr;
117 cookie_test->
co_addr = (uint64_t)&
obj->os_val;
151 char not_aligned[
sizeof(uint64_t) * 2];
166 for (
i = 1;
i <
sizeof(uint64_t); ++
i)
167 addr_sanity((
const uint64_t *)¬_aligned[
i],
true,
false);
175 for (
i = 1;
i <= 0xffff;
i++) {
180 word = (
i & ~0xf) | (
i << 16) | (
i << 32) | (
i << 48);
194 obj_ptrs[0] = obj_dynamic;
195 obj_ptrs[1] = &obj_automatic;
198 for (
i = 0;
i < 3; ++
i) {
M0_INTERNAL bool m0_addr_is_sane(const uint64_t *addr)
static void test_m0_cookie_of(struct m0_cookie *cookie_test, struct obj_struct *obj)
M0_INTERNAL bool m0_addr_is_sane_and_aligned(const uint64_t *addr)
#define m0_cookie_of(cookie, type, field)
M0_INTERNAL void m0_cookie_init(struct m0_cookie *cookie, const uint64_t *obj)
static struct obj_struct obj_bss
static void test_m0_cookie_dereference(struct m0_cookie *cookie_test, struct obj_struct *obj)
#define M0_ALLOC_PTR(ptr)
M0_INTERNAL void m0_cookie_new(uint64_t *gen)
static void test_init_apis(struct m0_cookie *cookie_test, struct obj_struct *obj)
#define M0_IS_8ALIGNED(val)
static const uint64_t readonly
static void addr_sanity(const uint64_t *addr, bool sane, bool aligned)
static void test_valid_cookie(struct m0_cookie *cookie_test, struct obj_struct *obj)
M0_INTERNAL int m0_cookie_dereference(const struct m0_cookie *cookie, uint64_t **addr)