cOMS/memory/ThreadedChunkMemory.h
Dennis Eichhorn 4f1cbd98f9
Some checks failed
Microsoft C++ Code Analysis / Analyze (push) Waiting to run
CodeQL / Analyze (${{ matrix.language }}) (autobuild, c-cpp) (push) Has been cancelled
started templating
2025-03-21 01:08:09 +00:00

37 lines
758 B
C

/**
* Jingga
*
* @copyright Jingga
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
#ifndef COMS_MEMORY_THREADED_CHUNK_MEMORY_H
#define COMS_MEMORY_THREADED_CHUNK_MEMORY_H
#include <string.h>
#include "../stdlib/Types.h"
#include "../thread/Thread.h"
struct ThreadedChunkMemory {
byte* memory;
uint64 size;
uint32 last_pos;
uint32 count;
uint32 chunk_size;
int32 alignment;
// length = count
// free describes which locations are used and which are free
uint64* free;
// Chunk implementation ends here
// The completeness indicates if the data is completely written to
uint64* completeness;
coms_pthread_mutex_t mutex;
coms_pthread_cond_t cond;
};
#endif