This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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; |