Added Software projects
git-svn-id: file:///srv/dev-disk-by-uuid-17e88007-4d0c-45e0-8757-cacfcc458630/repositories/svn/Diplomarbeit@55 9fe90eed-be63-e94b-8204-d34ff4c2ff93
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
#ifndef _MEM_MODH
|
||||
#define _MEM_MODH
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
typedef struct link_item
|
||||
{
|
||||
void *data;
|
||||
} link_item;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned char count;
|
||||
unsigned char size;
|
||||
unsigned char free_index;
|
||||
void *buffer;
|
||||
link_item *freelist;
|
||||
pthread_mutex_t mutex;
|
||||
} memman;
|
||||
|
||||
void Memmod_Init(memman *me,unsigned char buf_count,unsigned short buf_size);
|
||||
memman *Memmod_Create(unsigned char buf_count,unsigned short buf_size);
|
||||
unsigned char* Memmod_GetBuffer(memman *me);
|
||||
void *Memmod_Alloc(memman *me);
|
||||
void Memmod_Free(memman *me,void *buffer);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user