Motr  M0
cookie.c File Reference
#include <string.h>
#include "lib/types.h"
#include "lib/errno.h"
#include "lib/cookie.h"
#include "lib/arith.h"
#include "lib/time.h"
#include "lib/trace.h"
Include dependency graph for cookie.c:

Go to the source code of this file.

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_LIB
 

Functions

M0_INTERNAL bool m0_arch_addr_is_sane (const void *addr)
 
M0_INTERNAL int m0_arch_cookie_global_init (void)
 
M0_INTERNAL void m0_arch_cookie_global_fini (void)
 
M0_INTERNAL int m0_cookie_global_init (void)
 
M0_INTERNAL void m0_cookie_new (uint64_t *gen)
 
M0_INTERNAL void m0_cookie_init (struct m0_cookie *cookie, const uint64_t *obj)
 
M0_INTERNAL bool m0_addr_is_sane (const uint64_t *addr)
 
M0_INTERNAL bool m0_addr_is_sane_and_aligned (const uint64_t *addr)
 
M0_INTERNAL int m0_cookie_dereference (const struct m0_cookie *cookie, uint64_t **addr)
 
M0_INTERNAL bool m0_cookie_is_null (const struct m0_cookie *cookie)
 
M0_INTERNAL bool m0_cookie_is_eq (const struct m0_cookie *cookie1, const struct m0_cookie *cookie2)
 
M0_INTERNAL void m0_cookie_global_fini (void)
 

Variables

static uint64_t cookie_generation
 
M0_INTERNAL const struct m0_cookie M0_COOKIE_NULL