Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


Merge branch 'devel'
[palacios.git] / kitten / include / lwk / idspace.h
1 /* Copyright (c) 2008, Sandia National Laboratories */
2
3 #ifndef _LWK_IDSPACE_H
4 #define _LWK_IDSPACE_H
5
6 /**
7  * ID space object.
8  * An ID space consists of a range of IDs and keeps track of which are
9  * allocated and which are available for allocation.
10  */
11 typedef void * idspace_t;
12
13 /**
14  * Numeric identifier type.
15  */
16 typedef unsigned int id_t;
17
18 /**
19  * Used to request any available ID... pass as 'request' arg to id_alloc().
20  */
21 #define ANY_ID (-1)
22
23 /**
24  * ID space API.
25  */
26 int idspace_create(id_t min_id, id_t max_id, idspace_t *idspace);
27 int idspace_destroy(idspace_t idspace);
28 int idspace_alloc_id(idspace_t idspace, id_t request, id_t *id);
29 int idspace_free_id(idspace_t idspace, id_t id);
30
31 #endif