nuttx/include
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
..
arpa Remove psock_send and sockfd_socket from net/socket/socket.h 2020-01-31 13:45:15 -06:00
cxx Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
net Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
netinet include/netinet/arp.h: Previous network changes broke the build test (#193) 2020-01-31 21:23:15 +01:00
netpacket Run codespell -w against all files 2020-02-22 14:45:07 -06:00
nuttx include/nuttx: Fix improper use of inline 2020-03-02 22:06:04 +01:00
sys Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
.gitignore Remove exra whitespace from files (#189) 2020-01-31 09:24:49 -06:00
aio.h
alloca.h
assert.h
crc8.h Battery monitor support (#404) 2020-02-28 18:18:50 -06:00
crc16.h
crc32.h
crc64.h
ctype.h
debug.h Refine the preprocessor conditional guard style (#190) 2020-01-31 19:07:39 +01:00
dirent.h
dlfcn.h Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
dsp.h Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
elf32.h ELF64 support (#220) 2020-02-07 17:10:23 -06:00
elf64.h ELF64 support (#220) 2020-02-07 17:10:23 -06:00
elf.h ELF64 support (#220) 2020-02-07 17:10:23 -06:00
endian.h
errno.h
fcntl.h fcntl: add O_CLOEXEC/FD_CLOEXEC support 2020-02-20 08:20:38 -06:00
fixedmath.h Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
grp.h
hex2bin.h
inttypes.h Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
libgen.h
limits.h
locale.h
lzf.h Refine the preprocessor conditional guard style (#190) 2020-01-31 19:07:39 +01:00
mqueue.h
netdb.h
nxflat.h Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
poll.h
pthread.h Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
pwd.h
queue.h
sched.h Run all .c and .h files in PR235 through tools/nxstyle. 2020-02-09 07:34:24 -06:00
semaphore.h
signal.h
spawn.h
stdbool.h
stddef.h
stdint.h arch: Customize the typedef of size_t instead of intptr_t 2020-02-18 07:15:19 -06:00
stdio.h Replace #include <semaphore.h> to #include <nuttx/semaphore.h> 2020-02-01 08:27:30 -06:00
stdlib.h Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
stdnoreturn.h
string.h
strings.h
syscall.h
syslog.h Run codespell -w against all files 2020-02-22 14:45:07 -06:00
termios.h
threads.h
time.h Refine the preprocessor conditional guard style (#190) 2020-01-31 19:07:39 +01:00
unistd.h
wchar.h
wctype.h