I'm strugling with the following problem in TCC. I wrote some general linked list functions, like the one below:
Code: Select all
#define klibLinkedListPopFront(list) \
({ \
typeof(list) tmpItem = list; \
if(list != NULL) \
{ \
list = tmpItem->next; \
tmpItem->next = NULL; \
} \
tmpItem; \
})Code: Select all
// In header file:
extern PCB* readyQueue;
// In C file:
klibLinkedListPopFront(readyQueue);Code: Select all
typeof(list) tmpItemCode: Select all
extern PCB* tmpItemThanks in advance!
