Commit graph

7603 commits

Author SHA1 Message Date
wangmingrong1
11d54b34a7 Revert "mm_heap: double malloced memory default alignment (4 -> 8, 8 -> 16)"
This reverts commit 3e971d2e6d.
2025-01-09 00:00:11 +08:00
hujun5
428c2bfb91 Remove duplicate code
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2025-01-08 22:48:12 +08:00
hujun5
fabf4a5142 fix compile error
Error: /github/workspace/sources/nuttx/include/nuttx/spinlock_type.h:57:3: error: unknown type name 'atomic_t'
368   57 |   atomic_t owner;
369      |   ^~~~~~~~
370Error: /github/workspace/sources/nuttx/include/nuttx/spinlock_type.h:58:3: error: unknown type name 'atomic_t'
371   58 |   atomic_t next;
372      |   ^~~~~~~~

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2025-01-08 09:28:58 +08:00
zhangshoukui
aef24f5f3c rename lib_pathbuffer to lib_tempbuffer
Signed-off-by: zhangshoukui <zhangshoukui@xiaomi.com>
2025-01-07 21:54:33 +08:00
hujun5
57e54b399b sched: remove all spin_lock_irqsave(NULL)
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2025-01-06 23:11:44 +08:00
buxiasen
89455bc9a1 arch: up_getusrsp change to inline and implement in irq.h
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2025-01-06 23:03:05 +08:00
wangzhi16
893c5e92c2 Reduce the size of tcb by four bytes.
Signed-off-by: wangzhi16 <wangzhi16@xiaomi.com>
2025-01-02 23:18:42 +08:00
Tiago Medicci Serrano
a4fd1b3a6a netpacket/sockaddr_ll: Add valid packet types for sll_pkttype
Add valid packet types for the sll_pkttype member of the struct
sockaddr_ll. These definitions are commonly used by third-party
libraries.
2024-12-31 09:41:39 +08:00
wangmingrong1
b27dc9ee7f mm: Unified memory management alignment length
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-12-30 19:49:00 +08:00
Bowen Wang
f0a3c43a54 rpmsg/rpmsg_virtio_lite: rename rpmsg_virtio to rpmsg_virtio_lite
Because rpmsg_virtio_lite is a better name to inform user that the
rpmsg virtio (original name) is a lite implementation of rpmsg virtio.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-12-28 22:43:20 -03:00
zhangyuan29
ca4fd09275 arch_atomic: change atomic_fetch_x interface to inline function
When CONFIG_LIBC_ARCH_ATOMIC is defined, the atomic_fetch_x
interface conflicts with the atomic_fetch_x interface in libcxx.
Therefore, it has been changed to a inline function.

Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
2024-12-28 11:46:04 +08:00
zhanghongyu
05f7b7ac97 include/netinet/arp.h: change the type of arp_dev from uint8_t to char
the same variable type in linux is char, in order to avoid modifying
the third-party library code when porting the third-party library code.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-12-26 23:29:23 +08:00
zhangshoukui
f8377f8666 Add LINE_MAX configuration
Signed-off-by: zhangshoukui <zhangshoukui@xiaomi.com>
2024-12-26 13:25:19 +08:00
YAMAMOTO Takashi
958e30b3e2 Add some clarification comments on the mutex api
Some checks failed
Build Documentation / build-html (push) Has been cancelled
2024-12-25 11:11:41 +08:00
Matteo Golin
1cbb7183ad wireless/ieee82011: Used definitions from existing NuttX includes where possible, and otherwise defined macros using built-ins to allow the 802.11 header to compile on Arch Linux where cpu_to_le16, le32_to_cpu and hweight8 definitions were missing. 2024-12-23 14:50:13 +08:00
hujun5
8411a97b85 use small lock in following files
arch/xtensa/src/esp32s3/esp32s3_rtc_lowerhalf.c
arch/z16/src/z16f/z16f_serial.c
arch/z80/src/z8/z8_serial.c
boards/arm/max326xx/max32660-evsys/src/max326_button.c
boards/arm/stm32/stm32f4discovery/src/stm32_gs2200m.c
drivers/i2c/i2c_bitbang.c
drivers/power/supply/act8945a.c
drivers/serial/uart_pci_16550.c
drivers/serial/uart_pl011.c
drivers/wireless/bluetooth/bt_uart_shim.c

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-22 18:43:26 +08:00
yaojingwei
bbd6931d61 nuttx/audio: add fake audio driver.
The fake audio driver aims to easily simulate the functions of audio driver through reading and writing files.
With it, you can conveniently customize and define various capture or playback audio drivers for debugging or automated testing.

Signed-off-by: yaojingwei <yaojingwei@xiaomi.com>
2024-12-20 11:47:08 -03:00
guoshichao
a58d6552e6 fcntl: add sys/fcntl.h header file
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-12-20 11:46:14 -03:00
guoshichao
1701ca1e11 sem: add sys/sem.h header file
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-12-20 11:46:14 -03:00
guoshichao
0d4e36ce29 wait: add wait.h header file
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-12-20 11:46:14 -03:00
guoshichao
0af01312fd sys/socket: add SOL_PACKET packet operation type definition
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-12-20 11:46:14 -03:00
guoshichao
2badabfb67 signal: add include/sys/signal.h to the signal
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-12-20 11:46:14 -03:00
guoshichao
8fcdae3544 sys/types.h: add loff_t data type definition
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-12-20 11:46:14 -03:00
guoshichao
092f4a1b79 sys/mount: add mount flag definition
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-12-20 11:46:14 -03:00
guoshichao
16789ed818 signal: add SA_NOMASK flag definition
according to linux kernel doc, "the SA_NOMASK is an obsolete,
nonstandard synonym for this SA_NODEFER" flag, and some ltp linux kernel
testcases need this flag, so we add this flag to make the testcases pass

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-12-20 11:46:14 -03:00
guoshichao
a8cdd63d56 proctl: add PR_SET_DUMPABLE support
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-12-20 11:46:14 -03:00
guoshichao
203fb15c2e limits: add LINE_MAX limits definition
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-12-20 11:46:14 -03:00
guoshichao
23e0b70290 sys/resource: add RLIMIT_NICE consntant
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-12-20 11:46:14 -03:00
guoshichao
2b34c61c6e signal: add sa_restorer to struct sigaction
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-12-20 11:46:14 -03:00
wangjianyu3
0fe3aebd6a nuttx/uorb.h: Add carrier frequency for GNSS Satellite
The `struct sensor_gnss_satellite.cf` may be parsed from `GSV.signal_id`(e.g. NMEA 0183 v4.11) and `struct sensor_gnss_satellite.constellation`

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-12-20 20:05:26 +08:00
Alan Carvalho de Assis
0e162eeb7a drivers/sensors: Add Velocity sensor type to UORB
This patch adds support for velocity measurement sensors.
I plan to use it as a generic velocity type to be used for
Renesas FS3000 (Air Velocity Flow).

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2024-12-19 23:58:04 +01:00
Antoine Juckler
1f2946b7ab include/threads.h: Replace thrd_ defines by actual function definitions 2024-12-19 21:56:02 +08:00
guoshichao
ef6723af9e nuttx: add get_current_dir_name implementation
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-12-19 20:55:51 +08:00
hujun5
bc6bf019dd bt_buf: use small lock to protect bt_bufferlist_s
reason:
We would like to replace the big lock with a small lock.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-18 18:10:23 +08:00
Alin Jerpelea
fe90b2ee7a include: 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-12-18 17:51:57 +08:00
Alin Jerpelea
83de09d31a drivers/input/uinput: migrate to ASF license
Xiaomi has submitted the SGA and the license can be migrated to ASF

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-18 17:46:28 +08:00
Ville Juven
510d9659b4 sem_waitirq: Use kmap interface to access the semaphore
The temporary mappings via addrenv_select() and addrenv_restore() simply
do not work from interrupt, so remove its usage and replace with kmap
which is safe.
2024-12-18 08:57:01 +08:00
Ville Juven
95d1e52535 mm/kmap: Provide the user tcb as parameter to map_user()
This allows mapping pages from others than the running task. Obiously
this can only be done with proper preparations (the task in question
cannot exit before the mapping is released).
2024-12-18 08:57:01 +08:00
Eren Terzioglu
3894dc12b0 driver/capture: Add ioctl function for architecture specific ioctl commands 2024-12-17 13:35:42 -03:00
chao an
157e75c7ab lib/circbuf: add static initialize macro helper
struct circbuf_s circ = CIRCBUF_INITIALIZER(buffer, size);

Signed-off-by: chao an <anchao@lixiang.com>
2024-12-17 20:48:23 +08:00
chao an
e7c5608f4a drivers/reset: fix typo retrun -> return
Signed-off-by: chao an <anchao@lixiang.com>
2024-12-17 20:48:07 +08:00
chao an
f7ab66fa86 drivers/can: fix typo specfic -> specific
Signed-off-by: chao an <anchao@lixiang.com>
2024-12-17 20:48:07 +08:00
zhaohaiyang1
0913fa4b73 nuttx/can.h: delete "begin_packed_struct" and "end_packed_struct" qualifier
Signed-off-by: zhaohaiyang1 <zhaohaiyang1@xiaomi.com>
2024-12-16 18:52:02 +08:00
Alin Jerpelea
6c322d0bfa include/crypto/sha1: 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.

define NuttX local NuttX-PublicDomain identifier

 “Public Domain” is a concept distinct from copyright licensing;
it generally means that the work no longer has any copyright protection
or ownership, and therefore requires no license permission in order to
use, copy, modify, distribute, perform, display, etc.
In the United States – and many jurisdictions – copyright protections
attach automatically to creative works upon creation if they satisfy
certain minimum criteria.
“Public Domain” would thus represent a significant change to the legal
status of the work.
The rules around “Public Domain” often vary or are unspecified
jurisdiction to jurisdiction. Adding to the confusion, some
jurisdictions may not even recognize the concept of “Public Domain”
(or similar). As such, a license may nevertheless be required or implied
in these cases. Even in the U.S., there is no clear,
officially-sanctioned procedure for affirmatively placing
copyright-eligible works into the “Public Domain” aside from natural
statutory expiration of copyright. The bottom-line is, there are few if
any objective, brightline rules for proactively placing
copyright-eligible works into the Public Domain that we can broadly
rely on.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-16 14:18:35 +08:00
Alin Jerpelea
3b1a5ccffa include/crypto/rijndael: 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.

define NuttX local NuttX-PublicDomain identifier

 “Public Domain” is a concept distinct from copyright licensing;
it generally means that the work no longer has any copyright protection
or ownership, and therefore requires no license permission in order to
use, copy, modify, distribute, perform, display, etc.
In the United States – and many jurisdictions – copyright protections
attach automatically to creative works upon creation if they satisfy
certain minimum criteria.
“Public Domain” would thus represent a significant change to the legal
status of the work.
The rules around “Public Domain” often vary or are unspecified
jurisdiction to jurisdiction. Adding to the confusion, some
jurisdictions may not even recognize the concept of “Public Domain”
(or similar). As such, a license may nevertheless be required or implied
in these cases. Even in the U.S., there is no clear,
officially-sanctioned procedure for affirmatively placing
copyright-eligible works into the “Public Domain” aside from natural
statutory expiration of copyright. The bottom-line is, there are few if
any objective, brightline rules for proactively placing
copyright-eligible works into the Public Domain that we can broadly
rely on.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-16 14:18:35 +08:00
Alin Jerpelea
a273b094fa include/crypto/poly1305: 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.

define NuttX local NuttX-PublicDomain identifier

 “Public Domain” is a concept distinct from copyright licensing;
it generally means that the work no longer has any copyright protection
or ownership, and therefore requires no license permission in order to
use, copy, modify, distribute, perform, display, etc.
In the United States – and many jurisdictions – copyright protections
attach automatically to creative works upon creation if they satisfy
certain minimum criteria.
“Public Domain” would thus represent a significant change to the legal
status of the work.
The rules around “Public Domain” often vary or are unspecified
jurisdiction to jurisdiction. Adding to the confusion, some
jurisdictions may not even recognize the concept of “Public Domain”
(or similar). As such, a license may nevertheless be required or implied
in these cases. Even in the U.S., there is no clear,
officially-sanctioned procedure for affirmatively placing
copyright-eligible works into the “Public Domain” aside from natural
statutory expiration of copyright. The bottom-line is, there are few if
any objective, brightline rules for proactively placing
copyright-eligible works into the Public Domain that we can broadly
rely on.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-16 14:18:35 +08:00
Alin Jerpelea
7e74a0b8fa include/crypto/md5: 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.

define NuttX local NuttX-PublicDomain identifier

 “Public Domain” is a concept distinct from copyright licensing;
it generally means that the work no longer has any copyright protection
or ownership, and therefore requires no license permission in order to
use, copy, modify, distribute, perform, display, etc.
In the United States – and many jurisdictions – copyright protections
attach automatically to creative works upon creation if they satisfy
certain minimum criteria.
“Public Domain” would thus represent a significant change to the legal
status of the work.
The rules around “Public Domain” often vary or are unspecified
jurisdiction to jurisdiction. Adding to the confusion, some
jurisdictions may not even recognize the concept of “Public Domain”
(or similar). As such, a license may nevertheless be required or implied
in these cases. Even in the U.S., there is no clear,
officially-sanctioned procedure for affirmatively placing
copyright-eligible works into the “Public Domain” aside from natural
statutory expiration of copyright. The bottom-line is, there are few if
any objective, brightline rules for proactively placing
copyright-eligible works into the Public Domain that we can broadly
rely on.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-16 14:18:35 +08:00
Alin Jerpelea
085c7e7b81 include/crypto/cast: 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.

define NuttX local NuttX-PublicDomain identifier

 “Public Domain” is a concept distinct from copyright licensing;
it generally means that the work no longer has any copyright protection
or ownership, and therefore requires no license permission in order to
use, copy, modify, distribute, perform, display, etc.
In the United States – and many jurisdictions – copyright protections
attach automatically to creative works upon creation if they satisfy
certain minimum criteria.
“Public Domain” would thus represent a significant change to the legal
status of the work.
The rules around “Public Domain” often vary or are unspecified
jurisdiction to jurisdiction. Adding to the confusion, some
jurisdictions may not even recognize the concept of “Public Domain”
(or similar). As such, a license may nevertheless be required or implied
in these cases. Even in the U.S., there is no clear,
officially-sanctioned procedure for affirmatively placing
copyright-eligible works into the “Public Domain” aside from natural
statutory expiration of copyright. The bottom-line is, there are few if
any objective, brightline rules for proactively placing
copyright-eligible works into the Public Domain that we can broadly
rely on.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-16 14:18:35 +08:00
Alin Jerpelea
d9b5c6e498 include/search: 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.

define NuttX local NuttX-PublicDomain identifier

 “Public Domain” is a concept distinct from copyright licensing;
it generally means that the work no longer has any copyright protection
or ownership, and therefore requires no license permission in order to
use, copy, modify, distribute, perform, display, etc.
In the United States – and many jurisdictions – copyright protections
attach automatically to creative works upon creation if they satisfy
certain minimum criteria.
“Public Domain” would thus represent a significant change to the legal
status of the work.
The rules around “Public Domain” often vary or are unspecified
jurisdiction to jurisdiction. Adding to the confusion, some
jurisdictions may not even recognize the concept of “Public Domain”
(or similar). As such, a license may nevertheless be required or implied
in these cases. Even in the U.S., there is no clear,
officially-sanctioned procedure for affirmatively placing
copyright-eligible works into the “Public Domain” aside from natural
statutory expiration of copyright. The bottom-line is, there are few if
any objective, brightline rules for proactively placing
copyright-eligible works into the Public Domain that we can broadly
rely on.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-16 14:18:35 +08:00
geniusdo
fdbf520a99 fix a typo 2024-12-15 17:53:48 -03:00