Commit Graph

17 Commits

Author SHA1 Message Date
Alin Jerpelea 339457dda3 mm: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-09-13 08:49:05 +08:00
Nathan Hartman 3ed629274e mm: Fix some typos 2023-11-24 09:57:10 -08:00
yintao e503f86256 mm/cirbuf: Fix cannot continue read when tail > head
when head=0, tail has not yet rolled back, and at this time tail>head still has data to read

Signed-off-by: yintao <yintao@xiaomi.com>
2023-08-01 23:09:46 -07:00
dongjiuzhu1 33bd797bb3 mm/circbuf: skip buffer content according position in circbuf_peekat
The circbuf_peekat should copy valid content from the specfied position
of buffer, so skip the area from this position to the tail.

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-08-01 23:09:46 -07:00
chao an 6ee9ec7656 build: add initial cmake build system
1. Update all CMakeLists.txt to adapt to new layout
2. Fix cmake build break
3. Update all new file license
4. Fully compatible with current compilation environment(use configure.sh or cmake as you choose)

------------------

How to test

From within nuttx/. Configure:

cmake -B build -DBOARD_CONFIG=sim/nsh -GNinja
cmake -B build -DBOARD_CONFIG=sim:nsh -GNinja
cmake -B build -DBOARD_CONFIG=sabre-6quad/smp -GNinja
cmake -B build -DBOARD_CONFIG=lm3s6965-ek/qemu-flat -GNinja

(or full path in custom board) :
cmake -B build -DBOARD_CONFIG=$PWD/boards/sim/sim/sim/configs/nsh -GNinja

This uses ninja generator (install with sudo apt install ninja-build). To build:

$ cmake --build build

menuconfig:

$ cmake --build build -t menuconfig

--------------------------

2. cmake/build: reformat the cmake style by cmake-format

https://github.com/cheshirekow/cmake_format

$ pip install cmakelang

$ for i in `find -name CMakeLists.txt`;do cmake-format $i -o $i;done
$ for i in `find -name *\.cmake`;do cmake-format $i -o $i;done

Co-authored-by: Matias N <matias@protobits.dev>
Signed-off-by: chao an <anchao@xiaomi.com>
2023-07-08 13:50:48 +08:00
anjiahao 9971dfd0c1 circbuf support write or read buffer direct
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-04-23 23:32:00 +08:00
dongjiuzhu1 81825bc003 mm/circbuf: fix minor issue about update buffer head
update head pointer with skip before write buffer.

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-02-27 22:35:00 +08:00
dongjiuzhu1 89e8409244 mm/circbuf: update buffer head according to real length of writing
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-02-26 15:55:18 +08:00
Ville Juven 39a567db20 mm/circbuf.c: Fix incorrect usage of void* arithmetics 2022-11-23 23:22:06 +08:00
Xiang Xiao a446b5816f mm/circbuf: Remove MM_CIRCBUF option from Kconfig
since the linker can remove the unused object file from the final image

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-08 10:18:27 -03:00
Jiuzhu Dong 6e1244c274 mm/circbuf: add circ_peekat to read data with specified postion
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-25 13:35:26 +08:00
Jiuzhu Dong a853c70093 mm/circbuf: add circbuf_is_init to indicate circbuf state
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-25 13:35:26 +08:00
Jiuzhu Dong 9fb130cdea mm/circbuf: add sanity check for resize
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-12-17 23:36:07 -06:00
Xiang Xiao 2e54df0f35 Don't include assert.h from public header file
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-03 08:36:03 -07:00
Gustavo Henrique Nihei 76acb32e29 Fix typos reported by codespell 2021-02-25 11:31:49 -08:00
dongjiuzhu 642718709d mm/circbuf: fix the problem of dividing by zero.
N/A

Change-Id: I78a5cae0f782bc2c09848ebda9589dc53809e089
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-12-01 00:02:39 -06:00
dongjiuzhu 23ddeaf3be mm/circbuf: support circular buffer managerment
N/A

Change-Id: Ib1fc009b9ce3af5815920f22221fe8a7262299ef
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-11-20 05:33:03 -08:00