git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
refactor: change the disk io api to accept device instead of port struct
[lunaix-os.git]
/
lunaix-os
/
includes
/
lunaix
/
mm
/
cake.h
diff --git
a/lunaix-os/includes/lunaix/mm/cake.h
b/lunaix-os/includes/lunaix/mm/cake.h
index 8e971d82d3401961b2d26f18b8eabb5a1751c5cc..0312c45d381ac7854a802cb248eb792ac496cbf6 100644
(file)
--- a/
lunaix-os/includes/lunaix/mm/cake.h
+++ b/
lunaix-os/includes/lunaix/mm/cake.h
@@
-1,16
+1,19
@@
-#ifndef __LUNAIX_
SLAB
_H
-#define __LUNAIX_
SLAB
_H
+#ifndef __LUNAIX_
CAKE
_H
+#define __LUNAIX_
CAKE
_H
#include <lunaix/ds/llist.h>
#define PILE_NAME_MAXLEN 20
#include <lunaix/ds/llist.h>
#define PILE_NAME_MAXLEN 20
+#define PILE_CACHELINE 1
+
struct cake_pile
{
struct llist_header piles;
struct llist_header full;
struct llist_header partial;
struct llist_header free;
struct cake_pile
{
struct llist_header piles;
struct llist_header full;
struct llist_header partial;
struct llist_header free;
+ unsigned int offset;
unsigned int piece_size;
unsigned int cakes_count;
unsigned int alloced_pieces;
unsigned int piece_size;
unsigned int cakes_count;
unsigned int alloced_pieces;
@@
-33,15
+36,18
@@
struct cake_s
};
/**
};
/**
- * @brief 创建一个堆
+ * @brief 创建一个
蛋糕
堆
*
* @param name 堆名称
*
* @param name 堆名称
- * @param piece_size 每个蛋糕
上可以被切分
的大小
+ * @param piece_size 每个蛋糕
切块儿
的大小
* @param pg_per_cake 每个蛋糕所占据的页数
* @return struct cake_pile*
*/
struct cake_pile*
* @param pg_per_cake 每个蛋糕所占据的页数
* @return struct cake_pile*
*/
struct cake_pile*
-cake_new_pile(char* name, unsigned int piece_size, unsigned int pg_per_cake);
+cake_new_pile(char* name,
+ unsigned int piece_size,
+ unsigned int pg_per_cake,
+ int options);
/**
* @brief 拿一块儿蛋糕
/**
* @brief 拿一块儿蛋糕