Revert "Merge branch 'libl4thread' of git://www.b-labs.co.uk/bora/git/codezero into bora"

This reverts commit 3f870b540f.
This commit is contained in:
Bahadir Balban
2009-11-05 19:17:36 +02:00
parent e28658c10e
commit f7565118f1
39 changed files with 65 additions and 1051 deletions

View File

@@ -1,30 +0,0 @@
#ifndef __IDPOOL_H__
#define __IDPOOL_H__
#include <bit.h>
#include <string.h>
#include INC_GLUE(memory.h)
struct id_pool {
int nwords;
int bitlimit;
u32 bitmap[];
};
/* Copy one id pool to another by calculating its size */
static inline void id_pool_copy(struct id_pool *to, struct id_pool *from, int totalbits)
{
int nwords = BITWISE_GETWORD(totalbits);
memcpy(to, from, nwords * SZ_WORD + sizeof(struct id_pool));
}
struct id_pool *id_pool_new_init(int mapsize);
int id_new(struct id_pool *pool);
int id_del(struct id_pool *pool, int id);
int id_get(struct id_pool *pool, int id);
int id_is_empty(struct id_pool *pool);
int ids_new_contiguous(struct id_pool *pool, int numids);
int ids_del_contiguous(struct id_pool *pool, int first, int numids);
#endif /* __IDPOOL_H__ */