MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / RingBuffer

Method RingBuffer

Kernel/include/ringbuffer.h:20–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18 lock_t dequeueLock = 0;
19public:
20 RingBuffer(){
21 bufferSize = 64;
22 buffer = reinterpret_cast<T*>(kmalloc(sizeof(T) * bufferSize));
23
24 bufferEnd = &buffer[bufferSize];
25
26 enqueuePointer = buffer;
27 dequeuePointer = buffer;
28 }
29
30 void Enqueue(T* data){
31 acquireLock(&dequeueLock);

Callers

nothing calls this directly

Calls 1

kmallocFunction · 0.85

Tested by

no test coverage detected