nuttx/include/nuttx
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
..
1wire ds28e17.h edited online with Bitbucket 2018-04-05 12:08:56 +00:00
analog Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
audio include: audio: Remove packed_struct from struct ap_buffer_s 2020-02-27 23:31:41 -06:00
binfmt binfmt/exec: Make the spawn attribute take effect 2020-02-20 08:55:14 -06:00
can Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
contactless Merged in raiden00/nuttx_l0f0 (pull request #848) 2019-04-05 15:49:45 +00:00
crypto Refine the preprocessor conditional guard style (#190) 2020-01-31 19:07:39 +01:00
drivers Replace #include <semaphore.h> to #include <nuttx/semaphore.h> 2020-02-01 08:27:30 -06:00
eeprom Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
fs Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
i2c include/nuttx/i2c/i2c_master.h: Fix a small typo. 2018-12-07 18:53:57 -06:00
input Run codespell -w against all files 2020-02-22 14:45:07 -06:00
ioexpander Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
lcd Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
leds drivers/timers/pwm.c: Move the pwm/pwm.c driver to timers/pwm.c, The drivers/pwm contained only one .c file (pwm.c), so to avoid the proliferation of sub-directories inside drivers/ is better to move the pwm.c driver to drivers/timers. The pwm.h header was moved to include/nuttx/timers to keep consistency, so all files referencing it need to be updated. 2019-09-02 07:57:10 -06:00
lib ELF64 support (#220) 2020-02-07 17:10:23 -06:00
mbox This commit brings in the drivers needed to support OpenAMP. These changes were ported from https://github.com/FishsemiCode/nuttx. The current state: Most drivers do now compile but are not yet verfied. 2019-11-02 11:30:33 -06:00
mm Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
modem Merged in alinjerpelea/nuttx (pull request #1056) 2019-10-21 14:14:33 +00:00
mtd Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
net fs/nfs: Support both IPv6 and TCP 2020-03-02 15:04:07 -06:00
nx Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
power Battery monitor support (#404) 2020-02-28 18:18:50 -06:00
rf drivers/rf/dat-31r5-sp.c: dd support to the DAT-31R5-SP+ digital attenuator. Creates a the new device driver directory drivers/rf/ to support drivers related to RF peripherals. It also adds support for the DAT-31R5-SP+ digital attenuator. 2019-09-05 13:28:28 -06:00
rptun Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
sensors MCP9844 shutdown mode support (#403) 2020-02-28 16:21:56 -06:00
serial Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
spi Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
syslog syslog/rpmsg: Don't overwrite up_putc 2020-02-24 08:47:13 -06:00
timers Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
usb Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
video Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
wireless Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
.gitignore
addrenv.h Refine the preprocessor conditional guard style (#190) 2020-01-31 19:07:39 +01:00
arch.h Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
ascii.h
b2c.h Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
board.h Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
cache.h include/nuttx: Fix improper use of inline 2020-03-02 22:06:04 +01:00
cancelpt.h Make sure that labeling is used consistently in all function headers. 2018-02-01 10:00:02 -06:00
clock.h Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
compiler.h compiler.h: clang actually has long long 2020-02-13 08:21:18 -06:00
elf.h ELF64 support (#220) 2020-02-07 17:10:23 -06:00
environ.h All function pointer types should be prefaced by the qualifier CODE (unless the callable function is known to reside in RAM, then it should be FAR). 2019-08-26 17:31:29 -06:00
envpath.h binfmt/ and libs/libc: Make exepath_*() more common: 2018-11-08 07:27:14 -06:00
init.h libs/libc/unistd/lib_getcwd.c: remove stray sched_unlock(). Also fixes several typos. 2019-09-20 06:23:48 -06:00
irq.h include/nuttx/irq.h: Fix enter_critical_section/spin_lock_irqsave macro typo error and remove the duplicated inclusion of arch/irq.h 2019-01-27 11:21:03 -06:00
kmalloc.h Run codespell -w against all files 2020-02-22 14:45:07 -06:00
kthread.h Update some comments. Remove references to non-existent CONFIG_MAX_TASK_ARG. 2018-08-08 17:06:46 -06:00
list.h include/nuttx/list.h: fix typos 2020-01-18 21:44:07 -06:00
mmcsd.h Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
module.h Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
mqueue.h Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
mutex.h Fix a few minor typos 2019-09-08 15:59:14 -06:00
nuttx.h Kconfig: Move 'option modules' from NSH_FILE_APPS to BUILD_LOADABLE 2018-08-27 07:06:57 -06:00
page.h Run codespell -w against all files 2020-02-22 14:45:07 -06:00
pgalloc.h mm/mm_gran: Add a function to get information about the state of the granuale allocator. 2017-11-14 14:41:03 -06:00
progmem.h Merged in ebsong/nuttx (pull request #722) 2018-09-21 03:18:38 +00:00
pthread.h pthreads: Add support static pthread stack. Add standard pthread_attr_setstack() and pthread_attr_getstack(). In all cases where the stack is released, add check to see which allocator must be used to free the stack: The user or the kernel allocator. 2018-08-23 09:49:20 -06:00
random.h Standardization of some function headers. 2018-03-13 09:52:27 -06:00
sched.h Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
sched_note.h Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
scsi.h Fix use of undefined pp-token #errror, other typos. 2019-09-19 18:19:18 -06:00
sdio.h Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
semaphore.h include/nuttx: Fix improper use of inline 2020-03-02 22:06:04 +01:00
signal.h Fix minor typo / copy-paste. 'cancellaction point'->'cancellation point' 2019-08-23 11:57:35 -06:00
spawn.h syscall/ and related: Fix an error found in build testing. Inconsistent conditional compilation led to link errors in certain configurations. 2019-08-27 16:41:07 -06:00
spinlock.h sched/semaphore/spinlock.c: spin_trylock handle memory barrier and instrumentation correctly. 2019-11-03 19:40:58 -06:00
streams.h drivers/syslog: syslog_force does not set errno so do not test against it. Some changes to comments. 2019-09-16 07:48:48 -06:00
symtab.h Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
time.h Remove TIME_EXTENDED option to more conform C standard 2020-01-23 08:17:22 -06:00
tls.h
tree.h include/: Remove dangling space at the end of lines. 2017-06-28 13:30:08 -06:00
userspace.h Squashed commit of the following: 2019-04-29 14:52:05 -06:00
vt100.h
wdog.h Cosmetic updates. 2019-08-28 15:14:27 -06:00
wqueue.h Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
zoneinfo.h include/: Remove dangling space at the end of lines. 2017-06-28 13:30:08 -06:00