From: Alan Cox Date: Mon, 19 Oct 2015 20:52:30 +0000 (+0100) Subject: kernel.h: small tidy up of queue ifdeffery X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=4cdf22d08a006670067f79690e81bba4b6935429;p=FUZIX.git kernel.h: small tidy up of queue ifdeffery --- diff --git a/Kernel/include/kernel.h b/Kernel/include/kernel.h index e3ae0c16..667b8984 100644 --- a/Kernel/include/kernel.h +++ b/Kernel/include/kernel.h @@ -73,16 +73,14 @@ From UZI by Doug Braun and UZI280 by Stefan Nitschke. #define NO_DEVICE (0xFFFFU) #define NO_FILE (0xFF) +#if !defined(CONFIG_INDIRECT_QUEUES) +typedef unsigned char * queueptr_t; +#endif + typedef struct s_queue { - #if defined CONFIG_INDIRECT_QUEUES - queueptr_t q_base; /* Pointer to data */ - queueptr_t q_head; /* Pointer to addr of next char to read. */ - queueptr_t q_tail; /* Pointer to where next char to insert goes. */ - #else - unsigned char *q_base; /* Pointer to data */ - unsigned char *q_head; /* Pointer to addr of next char to read. */ - unsigned char *q_tail; /* Pointer to where next char to insert goes. */ - #endif + queueptr_t q_base; /* Pointer to data */ + queueptr_t q_head; /* Pointer to addr of next char to read. */ + queueptr_t q_tail; /* Pointer to where next char to insert goes. */ int q_size; /* Max size of queue */ int q_count; /* How many characters presently in queue */ int q_wakeup; /* Threshold for waking up processes waiting on queue */