#include "uffs/ubuffer.h"
#include "uffs/uffs_os.h"
#include <string.h>
Go to the source code of this file.
Functions | |
void * | uBufGet (struct ubufm *dis) |
void * | uBufGetBufByIndex (unsigned int index, struct ubufm *dis) |
void * | uBufGetCt (struct ubufm *dis) |
int | uBufGetIndex (void *p, struct ubufm *dis) |
int | uBufInit (struct ubufm *dis) |
int | uBufPut (void *p, struct ubufm *dis) |
int | uBufPutCt (void *p, struct ubufm *dis) |
Definition in file ubuffer.c.
void* uBufGet | ( | struct ubufm * | dis | ) |
get buffer from pool
Definition at line 78 of file ubuffer.c.
References ubufm::freeList.
Referenced by uffs_GetObject().
void* uBufGetBufByIndex | ( | unsigned int | index, | |
struct ubufm * | dis | |||
) |
get buffer pointer by index(offset)
Definition at line 137 of file ubuffer.c.
References ubufm::node_pool, and ubufm::node_size.
Referenced by uffs_GetObjectByIndex().
void* uBufGetCt | ( | struct ubufm * | dis | ) |
get buffer from pool this is Critical protect version, you should use this version when multitherad access the same buffer pool
Definition at line 94 of file ubuffer.c.
References ubufm::freeList.
int uBufGetIndex | ( | void * | p, | |
struct ubufm * | dis | |||
) |
get index by pointer
Definition at line 143 of file ubuffer.c.
References ubufm::node_pool, and ubufm::node_size.
Referenced by uffs_GetObjectIndex().
int uBufInit | ( | struct ubufm * | dis | ) |
init ubuffer data structure with given discriptor
Definition at line 53 of file ubuffer.c.
References ubufm::freeList, ubufm::node_nums, ubufm::node_pool, ubufm::node_size, and NULL.
Referenced by uffs_InitObjectBuf(), and uffs_InitTreeBuf().
int uBufPut | ( | void * | p, | |
struct ubufm * | dis | |||
) |
put buffer to pool
Definition at line 109 of file ubuffer.c.
References ubufm::freeList.
Referenced by uffs_PutObject().
int uBufPutCt | ( | void * | p, | |
struct ubufm * | dis | |||
) |