Commit Graph

6 Commits

Author SHA1 Message Date
Xiang Xiao b5f429c88b Fix nxstyle warning
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-08-22 17:37:21 -06:00
Xiang Xiao ae356001cf Change all files come from Xiaomi/Pinecone to Apache License 2.0
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-08-22 17:37:21 -06:00
Gregory Nutt 432f8b1e8d include/nuttx/cache.h: Fix a copy-paste error. 2020-03-04 12:37:21 -03:00
Gregory Nutt cd0a23e50e include/nuttx/cache.h: Fix errors in previous commit
Commit 3b53cd1e57, " Fix improper use of inline" missed conversion of several inline functions.  Also, some functions that require arguments were not handled correctly,

This was noted because there were still hundreds of implementations of the cache stubs in the ez80 build.  This commit adds the missing conversions and fixes the bad function arguments.
2020-03-04 12:09:48 -03:00
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
Xiang Xiao 64252a298f arch/: Unify the cache interface for all architectures 2019-03-19 10:37:13 -06:00