This commit is contained in:
zzy 2023-10-28 12:40:59 +08:00
parent d0f0491ed2
commit 71b109ee7b
2 changed files with 4 additions and 4 deletions

View File

@ -1,7 +1,7 @@
#ifndef _BKFIFO_H_ #ifndef _BKFIFO_H_
#define _BKFIFO_H_ #define _BKFIFO_H_
struct _kfifo_ { struct __bkfifo {
unsigned int in; unsigned int in;
unsigned int out; unsigned int out;
unsigned int mask; unsigned int mask;
@ -9,14 +9,14 @@ struct _kfifo_ {
void* data; void* data;
}; };
#define _SRTUCT_KFIFO_COMMON_(datatype, recsize, ptrtype) \ #define __SRTUCT_BKFIFO_COMMON(datatype, recsize, ptrtype) \
union { \ union { \
struct _kfifo_ kfifo; \ struct _kfifo_ kfifo; \
} }
#define _SRTUCT_KFIFO_(type, size, recsize, ptrtype) \ #define __SRTUCT_BKFIFO(type, size, recsize, ptrtype) \
{ \ { \
_STRUCT_KFIFO_COMMON_(type, recsize, ptrtype); \ __STRUCT_BKFIFO_COMMON(type, recsize, ptrtype); \
type buf[((size < 2) || (size & (size - 1))) ? -1 : size]; \ type buf[((size < 2) || (size & (size - 1))) ? -1 : size]; \
} }

BIN
include/llog.h Normal file

Binary file not shown.