zephyr/include
Benjamin Walsh 6209218f40 kernel: optimize ms-to-ticks for certain tick frequencies
Some tick frequencies lend themselves to optimized conversions from ms
to ticks and vice-versa.

- 1000Hz which does not need any conversion
- 500Hz, 250Hz, 125Hz where the division/multiplication are a straight
  shift since they are power-of-two factors of 1000.

In addition, some more generally used values are made to use optimized
conversion equations rather than the generic one that uses 64-bit math,
and often results in calling compiler intrinsics.

These values are: 100Hz, 50Hz, 25Hz, 20Hz, 10Hz, 1Hz (the last one used
in some testing).

Avoiding the 64-bit math intrisics has the additional benefit, in
addition to increased performance, of using a significant lower amount
of stack space: 52 bytes on ARM Cortex-M and 80 bytes on x86.

Change-Id: I080eb338a2637d6b1c6838c119af1a9fa37fe869
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-12-21 19:50:07 +00:00
..
arch arm: remove old GDB_INFO support 2016-12-19 19:17:30 +00:00
bluetooth logging: move sys_log to subsys/logging 2016-12-19 19:58:39 +00:00
debug tracing: rename CONFIG_DEBUG_TRACING_KERNEL_OBJECTS 2016-12-19 14:59:35 -05:00
display drivers: Replace DEV_OK by 0 2016-03-16 19:30:04 -04:00
drivers kernel/arch: remove obsolete instances of irq_connect 2016-12-17 22:44:35 +00:00
fs fs: expose generic ramdisk/flash disk access functions 2016-11-09 02:45:45 +00:00
iot iot/dns: Use a k_sem for the DNS rx routine 2016-12-16 19:14:53 +01:00
linker net: Declare a macro to define stacks used by networking 2016-12-02 12:41:14 +02:00
logging logging: move sys_log to subsys/logging 2016-12-19 19:58:39 +00:00
misc misc: add ceiling_fraction() macro 2016-12-21 19:50:07 +00:00
net net: Add ARG_UNUSED 2016-12-21 12:54:49 +00:00
toolchain toolchain: Add a popcount macro for GCC 2016-12-12 20:07:53 +00:00
usb usb: Add end-point stall APIs and flow control APIS 2016-11-09 02:45:46 +00:00
adc.h drivers/adc: Make references to driver_api const 2016-10-24 22:22:20 +00:00
aio_comparator.h aio_cmp_qmsi: Add get_pending_int API 2016-11-03 21:30:02 +00:00
atomic.h doc: Various corrections to doxygen info for Kernel APIs 2016-11-16 21:43:16 +00:00
cache.h
clock_control.h drivers/clock_control: Make references to driver_api const 2016-10-24 22:22:21 +00:00
counter.h counter: Fix interface 2016-11-30 14:39:10 +00:00
device.h device: do not set struct as deprecated 2016-12-11 06:36:14 -05:00
disk_access.h include: Add a generic disk interface 2016-11-09 02:45:44 +00:00
dma.h dma.h: add missing includes 2016-11-10 01:04:27 +00:00
eth.h drivers/eth: Make references to driver_api const 2016-10-24 22:22:22 +00:00
flash.h drivers/flash: Make references to driver_api const 2016-10-24 22:22:26 +00:00
fs.h fs: Make API naming adhere to the appropriate namespace 2016-10-31 08:08:10 +02:00
gpio.h gpio: Add doxygen markup for internal only definitions. 2016-11-22 17:01:27 +00:00
i2c.h i2c: Add doxygen markup for internal only definitions. 2016-12-04 12:49:43 +00:00
init.h kernel: deprecate old init levels 2016-11-09 17:59:44 +00:00
ipm.h drivers/ipm: Make references to driver_api const 2016-10-24 22:22:25 +00:00
irq_offload.h
irq.h doc: Fix up API description for IRQ_CONNECT() 2016-11-18 02:31:33 +00:00
kernel_version.h kernel: Allow SYS_KERNEL_VER_MAJOR(), etc. return full range of values. 2016-10-22 10:04:00 +00:00
kernel.h kernel: optimize ms-to-ticks for certain tick frequencies 2016-12-21 19:50:07 +00:00
legacy.h kernel: optimize ms-to-ticks for certain tick frequencies 2016-12-21 19:50:07 +00:00
linker-defs.h kernel/arch: consolidate tTCS and TNANO definitions 2016-11-12 07:04:52 -05:00
linker-tool-gcc.h x86 link: Specify ALIGN_WITH_INPUT for XIP data sections 2016-10-01 01:41:50 +00:00
linker-tool.h
microkernel.h include: remove old kernel defintions 2016-11-07 11:32:57 -08:00
nanokernel.h include: remove old kernel defintions 2016-11-07 11:32:57 -08:00
pinmux.h drivers/pinmux: Make references to driver_api const 2016-10-24 22:22:24 +00:00
power.h power_mgmt: Rename _sys_soc_resume notification disabling API 2016-11-11 20:40:54 +00:00
pwm.h drivers: pwm: re-design pwm API interfaces 2016-10-31 20:01:04 +00:00
rtc.h rtc_qmsi: Add get_pending_int API 2016-11-03 21:30:21 +00:00
section_tags.h arm: remove old GDB_INFO support 2016-12-19 19:17:30 +00:00
sections.h arm: remove old GDB_INFO support 2016-12-19 19:17:30 +00:00
sensor.h sensor: Introduce tap and double tap triggers 2016-12-21 08:06:56 -06:00
shared_irq.h drivers/shared_irq: Make references to driver_api const 2016-10-24 22:22:23 +00:00
spi.h drivers/spi: Make references to driver_api const 2016-10-24 22:22:20 +00:00
sw_isr_table.h nios2: add static interrupt handling code 2016-06-22 16:42:21 +00:00
sys_clock.h doc: Add descriptions for clock-related helper macros 2016-11-18 02:31:35 +00:00
sys_io.h sys_io: don't allow negative bit offsets 2016-03-04 16:26:21 +00:00
toolchain.h doc: revert unnamed union/struct workaround in favour of known-issues 2016-07-01 21:53:45 +00:00
uart.h serial: fix up uart_poll_in docstring 2016-11-16 22:57:30 +00:00
watchdog.h drivers/watchdog: Make references to driver_api const. 2016-10-24 22:22:19 +00:00
zephyr.h include: remove old kernel defintions 2016-11-07 11:32:57 -08:00