incubator-nuttx/sched
Gregory Nutt 3b53cd1e57 include/nuttx: Fix improper use of inline
I finally figured out why the ez80 code has gotten so big.  It is because people have been put putting big inline functions in header files.  That is a violation of the coding standard, since only c89 compatibility is required in all common code. But we have been tolerating inline function it because include/nuttx/compiler.h defines 'inline' to be nothing for C89 compilers.

As a result, static inline functions declared within a C file not so bad; the inline qualifier is ignored, if not supported, but otherwise all is well.

But it is catastrophic in header files.  Those static inline functions are included as static functions and implemented in EVERY file that includes those header files, even if the functions are never called.  That makes the code base huge!So there is another PR coming to fix some of the worst offenders.

This commit fixes two of the worst offenders I have encountered so far:  include/nuttx/sempahore.h and cache.h.  But there may be a few other changes needed.  Under include/nuttx there are still inline functions thread.h, inclue/nuttx/list.h, mutex.h, tree.h, and include/nuttx/crypto/blake2s.h with no protection for compilers that do not handler the inline qualifier.  Otherwise we are clean.

With the changes to these two header files, the size of the z20x build is reduced by about 40%.  And incredible size savings.
2020-03-02 22:06:04 +01:00
..
clock Make compare_timespec public so timer driver could reuse it 2020-02-15 07:17:07 -06:00
environ Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
errno Standardization of some function headers. 2018-03-13 09:52:27 -06:00
group Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
init Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
irq Call up_irqinitialize from irq subsystem 2020-02-08 07:39:22 -06:00
module Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
mqueue Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
paging Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
pthread Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
sched Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
semaphore include/nuttx: Fix improper use of inline 2020-03-02 22:06:04 +01:00
signal Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
task Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
timer libs/libc/unistd/lib_alarm.c,sched/timer/timer_getitimer.c: Silence a 2020-02-19 18:02:25 -06:00
wdog Fix wait loop and void cast (#24) 2020-01-02 10:54:43 -06:00
wqueue Replace #include <semaphore.h> to #include <nuttx/semaphore.h> 2020-02-01 08:27:30 -06:00
.gitignore
Kconfig Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
Makefile TLS: Simplify 2016-03-11 07:17:32 -06:00