Files
codezero/tasks/mm0/include/lib/idpool.h
Bahadir Balban d67d6b84a9 Wiring between mm0 page cache and vfs almost what it should look like.
This implements the infrastructure for read/write system calls where
file content is first searched in mm0's page cache and then read-in
or written via the vfs read/write functions.
	modified:   tasks/fs0/src/syscalls.c
	modified:   tasks/mm0/include/lib/bit.h
	modified:   tasks/mm0/include/lib/idpool.h
	modified:   tasks/mm0/include/task.h
	modified:   tasks/mm0/include/vm_area.h
	modified:   tasks/mm0/main.c
	modified:   tasks/mm0/src/devzero.c
	modified:   tasks/mm0/src/fault.c
	new file:   tasks/mm0/src/file.c
	modified:   tasks/mm0/src/init.c
	modified:   tasks/mm0/src/lib/bit.c
	modified:   tasks/mm0/src/lib/idpool.c
	modified:   tasks/mm0/src/task.c
2008-02-18 22:26:39 +00:00

21 lines
494 B
C

#ifndef __MM0_IDPOOL_H__
#define __MM0_IDPOOL_H__
#include <lib/bit.h>
#include <lib/spinlock.h>
struct id_pool {
struct spinlock lock;
int nwords;
u32 bitmap[];
};
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 ids_new_contiguous(struct id_pool *pool, int numids);
int ids_del_contiguous(struct id_pool *pool, int first, int numids);
#endif /* __MM0_IDPOOL_H__ */