projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Destroy PT pages in addrspace_destroy().
[pintos-anon]
/
src
/
lib
/
bitmap.h
diff --git
a/src/lib/bitmap.h
b/src/lib/bitmap.h
index ba4465e4e595cf040574f8388be5bade0f837d85..2dbf38a4bdfb9faa179cbb6daa7b82ad209db915 100644
(file)
--- a/
src/lib/bitmap.h
+++ b/
src/lib/bitmap.h
@@
-4,16
+4,19
@@
#include <stdbool.h>
#include <stddef.h>
#include <stdbool.h>
#include <stddef.h>
+typedef unsigned long elem_type;
+
struct bitmap
{
size_t bit_cnt;
elem_type *bits;
};
struct bitmap
{
size_t bit_cnt;
elem_type *bits;
};
-
void
bitmap_init (struct bitmap *, size_t bit_cnt);
+
bool
bitmap_init (struct bitmap *, size_t bit_cnt);
void bitmap_destroy (struct bitmap *);
size_t bitmap_size (const struct bitmap *);
void bitmap_destroy (struct bitmap *);
size_t bitmap_size (const struct bitmap *);
+size_t bitmap_storage_size (const struct bitmap *);
void bitmap_set (struct bitmap *, size_t idx, bool);
void bitmap_set_all (struct bitmap *, bool);
void bitmap_set (struct bitmap *, size_t idx, bool);
void bitmap_set_all (struct bitmap *, bool);
@@
-36,4
+39,12
@@
bool bitmap_any (const struct bitmap *);
bool bitmap_none (const struct bitmap *);
bool bitmap_all (const struct bitmap *);
bool bitmap_none (const struct bitmap *);
bool bitmap_all (const struct bitmap *);
+#ifdef FILESYS
+struct file;
+void bitmap_read (struct bitmap *, struct file *);
+void bitmap_write (const struct bitmap *, struct file *);
+#endif
+
+void bitmap_dump (const struct bitmap *);
+
#endif /* bitmap.h */
#endif /* bitmap.h */