Apache NuttX is a mature, real-time embedded operating system (RTOS) https://nuttx.apache.org/
Find a file
ligd 7fc03e0084 lib: generic optimization for constant divisor on 32-bit machines
64-by-32-bit divisions are prominent in the NuttX, even on 32-bit
machines.  Luckily, many of them use a constant divisor that allows
for a much faster multiplication by the divisor's reciprocal.

The compiler already performs this optimization when compiling a 32-by-32
division with a constant divisor. Unfortunately, on 32-bit machines, gcc
does not optimize 64-by-32 divisions in that case, except for constant
divisors that happen to be a power of 2.

Let's avoid the slow path whenever the divisor is constant by manually
computing the reciprocal ourselves and performing the multiplication
inline.  In most cases, this improves performance of 64-by-32 divisions
by about two orders of magnitude compared to the __div64_32() fallback,
especially on architectures lacking a native div instruction.

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-09-12 18:14:39 +08:00
.github build(deps): bump github/super-linter from 6 to 7 2024-09-07 12:08:11 +08:00
arch clock: Replace all ts and tick conversion functions 2024-09-12 18:14:39 +08:00
audio audio: migrate to SPDX identifier 2024-09-10 11:33:26 +08:00
binfmt binfmt: migrate to SPDX identifier 2024-09-10 11:34:18 +08:00
boards boards/x86_64/qemu-intel64: enable debug messages for PCI test configs 2024-09-12 18:10:46 +08:00
cmake cmake: migrate to SPDX identifier 2024-09-10 11:34:40 +08:00
crypto nuttx/crypto: export Diffie-Hellman algorithm 2024-09-09 23:55:33 +08:00
Documentation Documentation: Add guide for fastboot 2024-09-12 01:35:52 +08:00
drivers clock: Replace all ts and tick conversion functions 2024-09-12 18:14:39 +08:00
dummy build: add initial cmake build system 2023-07-08 13:50:48 +08:00
fs clock: Replace all ts and tick conversion functions 2024-09-12 18:14:39 +08:00
graphics graphics: migrate to SPDX identifier 2024-09-10 22:54:31 +08:00
include lib: generic optimization for constant divisor on 32-bit machines 2024-09-12 18:14:39 +08:00
libs usleep: use div_const to optimize the usleep 2024-09-12 18:14:39 +08:00
mm build: fix memory manager compile options for CMake 2024-09-10 16:00:56 +08:00
net ipfrag:fix warnig 2024-09-12 17:15:13 +08:00
openamp openamp: migrate to SPDX identifier 2024-09-10 22:54:05 +08:00
pass1 tools: migrate to SPDX identifier 2024-09-10 23:11:11 +08:00
sched usleep: use div_const to optimize the usleep 2024-09-12 18:14:39 +08:00
syscall syscall: migrate to SPDX identifier 2024-09-12 02:25:00 +08:00
tools tools: migrate to SPDX identifier 2024-09-10 23:11:11 +08:00
video video: migrate to SPDX identifier 2024-09-11 19:49:53 +08:00
wireless wireless: migrate to SPDX identifier 2024-09-11 19:49:34 +08:00
.asf.yaml
.gitignore .gitignore: Update .gitignore to include .aider* and fix newline issue 2024-09-10 16:22:02 +02:00
.pre-commit-config.yaml Created pre-commit config file 2024-08-19 21:40:56 +02:00
.yamllint
AUTHORS AUTHORS: add Tomek CEDRO to the list 2023-03-07 14:15:55 +01:00
CMakeLists.txt tools: migrate to SPDX identifier 2024-09-10 23:11:11 +08:00
CONTRIBUTING.md Remove the tail spaces from all files except Documentation 2023-02-26 13:24:24 -08:00
INVIOLABLES.md
Kconfig make/disassembly: generate disassembly file 2024-08-16 15:22:25 +08:00
LICENSE libc/x86_64: port string functions from bionic 2024-07-02 23:59:18 +08:00
Makefile tools: migrate to SPDX identifier 2024-09-10 23:11:11 +08:00
NOTICE Remove the double blank line from source files 2022-02-20 20:10:14 +01:00
README.md Gathering community recommendations 2023-10-28 13:55:56 +08:00
ReleaseNotes Documentation: move ReleaseNotes 2023-09-26 20:41:00 +08:00

POSIX Badge License Issues Tracking Badge Contributors GitHub Build Badge Documentation Badge

Apache NuttX is a real-time operating system (RTOS) with an emphasis on standards compliance and small footprint. Scalable from 8-bit to 64-bit microcontroller environments, the primary governing standards in NuttX are POSIX and ANSI standards. Additional standard APIs from Unix and other common RTOSs (such as VxWorks) are adopted for functionality not available under these standards, or for functionality that is not appropriate for deeply-embedded environments (such as fork()).

For brevity, many parts of the documentation will refer to Apache NuttX as simply NuttX.

Getting Started

First time on NuttX? Read the Getting Started guide! If you don't have a board available, NuttX has its own simulator that you can run on terminal.

Documentation

You can find the current NuttX documentation on the Documentation Page.

Alternatively, you can build the documentation yourself by following the Documentation Build Instructions.

The old NuttX documentation is still available in the Apache wiki.

Supported Boards

NuttX supports a wide variety of platforms. See the full list on the Supported Platforms page.

Contributing

If you wish to contribute to the NuttX project, read the Contributing guidelines for information on Git usage, coding standard, workflow and the NuttX principles.

License

The code in this repository is under either the Apache 2 license, or a license compatible with the Apache 2 license. See the License Page for more information.