Skip to content

Instantly share code, notes, and snippets.

View porcoesphino's full-sized avatar

Bodey Baker porcoesphino

View GitHub Profile
#define LEN 20
void volatile* raw_queue[LEN];
int volatile reader_ctr = 0;
int volatile writer_ctr = 0;
_Bool push_packet(void* pointer) {
ASSERT(pointer != NULL);
bool result = false;
DISABLED_INTERRUPTS(
int nextElement = (writer_ctr + 1) % LEN;