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) tmpItem
Code: Select all
extern PCB* tmpItem
Thanks in advance!