upstream u-boot with additional patches for our devices/boards:
https://lists.denx.de/pipermail/u-boot/2017-March/282789.html (AXP crashes) ;
Gbit ethernet patch for some LIME2 revisions ;
with SPI flash support
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
585 B
24 lines
585 B
#ifndef TYPECHECK_H_INCLUDED
|
|
#define TYPECHECK_H_INCLUDED
|
|
|
|
/*
|
|
* Check at compile time that something is of a particular type.
|
|
* Always evaluates to 1 so you may use it easily in comparisons.
|
|
*/
|
|
#define typecheck(type,x) \
|
|
({ type __dummy; \
|
|
typeof(x) __dummy2; \
|
|
(void)(&__dummy == &__dummy2); \
|
|
1; \
|
|
})
|
|
|
|
/*
|
|
* Check at compile time that 'function' is a certain type, or is a pointer
|
|
* to that type (needs to use typedef for the function type.)
|
|
*/
|
|
#define typecheck_fn(type,function) \
|
|
({ typeof(type) __tmp = function; \
|
|
(void)__tmp; \
|
|
})
|
|
|
|
#endif /* TYPECHECK_H_INCLUDED */
|
|
|