19 #ifndef _COBALT_KERNEL_MAP_H 20 #define _COBALT_KERNEL_MAP_H 22 #include <asm/bitsperlong.h> 29 #define XNMAP_MAX_KEYS (BITS_PER_LONG * BITS_PER_LONG) 37 #define __IDMAP_LONGS ((XNMAP_MAX_KEYS+BITS_PER_LONG-1)/BITS_PER_LONG) 38 unsigned long lomap[__IDMAP_LONGS];
58 int ofkey = key - map->offset;
59 return map->objarray[ofkey];
64 int ofkey = key - map->offset;
66 if (ofkey < 0 || ofkey >= map->nkeys)
69 return map->objarray[ofkey];
int xnmap_enter(struct xnmap *map, int key, void *objaddr)
Index an object into a map.
Definition: map.c:153
static void * xnmap_fetch_nocheck(struct xnmap *map, int key)
Search an object into a map - unchecked form.
Definition: map.h:56
void xnmap_delete(struct xnmap *map)
Delete a map.
Definition: map.c:119
int xnmap_remove(struct xnmap *map, int key)
Remove an object reference from a map.
Definition: map.c:213
static void * xnmap_fetch(struct xnmap *map, int key)
Search an object into a map.
Definition: map.h:62
struct xnmap * xnmap_create(int nkeys, int reserve, int offset)
Create a map.
Definition: map.c:81