Nathan Hartman
ce20211357
Fix various typos in comments and documentation
...
Fix typos in these files:
* Documentation/components/drivers/character/foc.rst
* Documentation/guides/cpp_cmake.rst
* Kconfig
* arch/arm/src/imxrt/imxrt_lpspi.c
* arch/arm/src/kinetis/kinetis_spi.c
* arch/arm/src/kl/kl_spi.c
* arch/arm/src/lpc31xx/lpc31_spi.c
* arch/arm/src/nrf52/nrf52_radio.h
* arch/arm/src/s32k1xx/s32k1xx_lpspi.c
* arch/arm/src/stm32/Kconfig
* arch/arm/src/stm32/stm32_adc.c
* arch/arm/src/stm32/stm32_foc.c
* arch/arm/src/stm32/stm32_foc.h
* arch/arm/src/stm32/stm32_pwm.c
* arch/arm/src/stm32/stm32_spi.c
* arch/arm/src/stm32f0l0g0/stm32_spi.c
* arch/arm/src/stm32f7/Kconfig
* arch/arm/src/stm32f7/stm32_spi.c
* arch/arm/src/stm32h7/Kconfig
* arch/arm/src/stm32h7/stm32_allocateheap.c
* arch/arm/src/stm32h7/stm32_fmc.c
* arch/arm/src/stm32h7/stm32_fmc.h
* arch/arm/src/stm32h7/stm32_pwm.c
* arch/arm/src/stm32h7/stm32_qspi.c
* arch/arm/src/stm32h7/stm32_spi.c
* arch/arm/src/stm32l4/stm32l4_pwm.c
* arch/arm/src/stm32l4/stm32l4_spi.c
* arch/arm/src/stm32l5/Kconfig
* arch/arm/src/stm32l5/stm32l5_spi.c
* arch/renesas/src/rx65n/rx65n_dtc.c
* arch/renesas/src/rx65n/rx65n_usbdev.c
* arch/risc-v/src/rv32m1/rv32m1_serial.c
* boards/arm/stm32/b-g431b-esc1/src/stm32_foc.c
* boards/arm/stm32/nucleo-f103rb/src/stm32_foc_ihm07m1.c
* boards/arm/stm32/nucleo-f302r8/src/stm32_foc_ihm07m1.c
* boards/arm/stm32h7/nucleo-h743zi2/README.txt
* boards/risc-v/rv32m1/rv32m1-vega/README.txt
* boards/sim/sim/sim/scripts/Make.defs
* drivers/1wire/1wire.c
* drivers/1wire/1wire_internal.h
* drivers/lcd/Kconfig
* drivers/syslog/ramlog.c
* fs/fat/Kconfig
* libs/libc/debug/Kconfig
* libs/libc/machine/Kconfig
* libs/libc/stdio/lib_libvsprintf.c
* libs/libc/stdlib/lib_div.c
* libs/libc/stdlib/lib_ldiv.c
* libs/libc/stdlib/lib_lldiv.c
* libs/libdsp/lib_observer.c
2021-07-04 11:23:26 -05:00
Huang Qi
50c08bf45b
libc: Move pthread_key_destructor to task_info_s
...
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2021-07-04 07:36:44 -05:00
SPRESENSE
f75437d3f3
libs: libnx: nxfonts: Fix prefix of generated fonts data
...
This commit fixes a compile error caused by the following commit.
fe9ccff
libs: libnx: nxfonts: fix Mixed case identifier
Change the prefix of generated font data to lower case.
2021-07-03 23:14:19 -05:00
Xiang Xiao
e2d827cb6d
libc/time: Initialize tm_zone field correctly
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ief32aedc72ec062d428f8538a25ddfe4f81d7e29
2021-07-02 09:27:23 -07:00
Xiang Xiao
d72655e74c
libc/time: Fix nxstyle issue in lib_localtime.c
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I2e98d92e62b47ade375bda3f043175841d9fa1b7
2021-07-02 09:27:23 -07:00
Xiang Xiao
3e4511978a
libc/time: Rename lclptr/gmtptr to g_lcl_ptr/g_gmt_ptr
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I380f28c15ffe3d98734016bfedb1618b20a5f400
2021-07-02 09:27:23 -07:00
Xiang Xiao
dcad420127
libc/time: Update g_lcl_tzname only after the success
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I0117c5b43bee3affb36d118e0b97f6dd7137080b
2021-07-02 09:27:23 -07:00
Xiang Xiao
26908f472e
libc/time: Avoid modify the global variables concurrently in tzset
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I7fb6439c3a669ef07c1756ccc294cd487805a510
2021-07-02 09:27:23 -07:00
Xiang Xiao
4ecabe5fc2
libc/time: Change the type of ls_corr to int_fast32_t
...
since the leap correction is always four bytes in timezone file
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I2d72f5eaf37f0c86d95eaf7504a1b8b1469bf06a
2021-07-02 09:27:23 -07:00
Xiang Xiao
41409eb0bc
libc/time: Update TZDEFRULESTRING to ",M3.2.0,M11.1.0"
...
which is the current DST plan used by US
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I50001e69ec1cb9cbf6a0b84fc87f4ad8ff41c0f0
2021-07-02 09:27:23 -07:00
Xiang Xiao
aa202adaaa
libc/time: Update timezone by tzset in localtime_r
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I54d6aed8f6bc35c1a1d8156702ff71471c3f8066
2021-07-02 09:27:23 -07:00
Xiang Xiao
d2c33fc180
libc/zoneinfo: Correct the path in comment
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I4bc0490d12f8b469a1f250cd410290a51ef9640f
2021-07-02 09:27:23 -07:00
Huang Qi
65fa11634b
sched: Refine tls_info_s and task_info_s
...
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2021-07-02 10:33:34 -05:00
ligd
179f5999d9
libs/libc/spawn: fix posix_spawn_file_actions_adddup2 alloc size error
...
Change-Id: I9f6f2c87b0d54c1c1a71056073a1d358b87dd1fd
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-07-01 12:14:50 -07:00
Xiang Xiao
187538c0b9
Move aligned_alloc, posix_memalign and valloc from mm/umm to libs/libc/stdlib
...
since the similar functions(e.g. strdup/strndup) put into libs/libc/string
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ifb2c0c51298b09014748e5ee8275db51213d6911
2021-07-01 11:44:38 -07:00
Xiang Xiao
1d0ade6fa2
libc: Remove the duplication lib_xxx macro
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I73c876ed40811c013dad83b8b2aeb7bdc3041913
2021-07-01 11:28:34 -07:00
McKay Ransom
863834057b
Renesas/RX: add RX setjmp, ARCH_RENESAS_RX, and RX65N ioctl
2021-06-30 23:01:57 -05:00
Xiang Xiao
4ba1bafe55
libc/debug: Rename CONFIG_EABI_UNWINDER to CONFIG_UNWINDER
...
since the unwinder not only work with arm but also other arch(e.g. riscv)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I56cc54f2c99560c858362ab2dfba524097385716
2021-06-30 05:08:57 -07:00
Xiang Xiao
20f5a28e49
net: Add if_nameindex and if_freenameindex API
...
Specified here:
https://man7.org/linux/man-pages/man3/if_nameindex.3.html
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ia5daed775bd11fa5978d54860632554da8f7b416
2021-06-26 22:37:12 +01:00
Xiang Xiao
6d8d5af345
libc/dirname: Handle the consecutive '/' correctly
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I8387aca067e91724fb4656cd7af59bbd626ceffa
2021-06-24 13:21:00 +01:00
Xiang Xiao
5a6e08e281
lic/libgen: Remove g_retchar from basename/dirname
...
to avoid the race condtion
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: If55fba8eca7b98d6a8f0fb44393cf4858b9e9ae4
2021-06-24 13:21:00 +01:00
Xiang Xiao
9cc41f44f0
libc/sched: Implement nice API
...
Specified here:
https://pubs.opengroup.org/onlinepubs/007904875/functions/nice.html
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ib25be28c8dc1c9288e8c78ad756c91ec6ef325a7
2021-06-24 08:50:48 -03:00
Xiang Xiao
3d0320f891
libc/sched: Map the nice value more correctly
...
from https://pubs.opengroup.org/onlinepubs/007904875/functions/setpriority.html :
1.The nice value shall in the range [-{NZERO},{NZERO} -1]
2.Lower nice value shall cause more favorable scheduling
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I5ad60d92abc3b69fbaa406da68cec2e40ca3fa6d
2021-06-24 08:50:48 -03:00
Huang Qi
fe992a5b6c
libc: Implement fesetround & fegetround for arm
...
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2021-06-24 08:47:34 -03:00
Xiang Xiao
b1cd825cac
libc/time: Implement timegm function
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Id988ae077cf54597b2522546c4309b66416b8b0e
2021-06-23 13:43:32 -03:00
Abdelatif Guettouche
af5e0c620f
Rename MODULE_TEXT to TEXT_HEAP as the latter is more generic.
...
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-06-18 07:14:17 -05:00
YAMAMOTO Takashi
4666b39f9c
dns_recv_response: Fix IPv6 address in an ninfo()
2021-06-17 02:52:04 -05:00
chao.an
f3a5aee7d7
libs/libc/netdb: add dns clear interface
...
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-06-11 04:54:30 -05:00
Virus.V
317bd40fec
net/dns:fix unaligned access in dns query
2021-06-10 02:03:31 -05:00
YAMAMOTO Takashi
b3e8535ad6
Revert "tls: Move pthread key destructor to libc"
...
This reverts commit cc514d7791
.
* It introduced a regression.
https://github.com/apache/incubator-nuttx/issues/3868
* It seems conceptually wrong to have per-process data in
the main thread's stack.
2021-06-09 07:59:44 -05:00
YAMAMOTO Takashi
8079d9fac3
Revert "TLS: Correct handling of returned error values."
...
This reverts commit 9aaeaefa41
.
2021-06-09 07:59:44 -05:00
Gregory Nutt
9aaeaefa41
TLS: Correct handling of returned error values.
...
I not two problems in handling of the return error values in PR #3858 :
1. In KERNEL mode, the error return value of _SEM_WAIT() will be a negated errno value; in all other modes, it will be -1 (ERROR) with the errno variable set. This must be handled in the test of the returned value: Don't compare with -1; rather check if < 0
2. Also, conversion of the returned value to a negated errno value must be handled differently. This is handled by replacing -get_errno() with the macro _ERRVAL(ret)
This effects only error handling (it fixes it) and no other impacts are expected.
2021-06-07 22:32:42 -03:00
Huang Qi
cc514d7791
tls: Move pthread key destructor to libc
...
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2021-06-06 15:25:56 -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
YAMAMOTO Takashi
d6ed7464b3
Kconfig: Make NETDB_DNSCLIENT select NET_SOCKOPTS
...
Because it uses SO_RCVTIMEO.
2021-06-03 10:05:33 -05:00
tobias2johansson
ac32d1a68e
libs/libc/audio/libsrc: update header location
...
update Make.defs with the correct path to the library header and
make sure it can be found
2021-06-02 02:27:36 -05:00
Xiang Xiao
ae216cf9e9
sched/task: Simplify the syscall handling of task_spawn
...
It's better to save one argument by returning pid directly.
This change also follow the convention of task_create.
BTW, it is reasonable to adjust the function prototype a
little bit from both implementation and consistency since
task_spawn is NuttX specific API.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-01 12:45:10 +09:00
Gregory Nutt
b991f30b82
syscall/syscall.csv: Correct ordering of entries
...
OS functions in syscall.csv are ordered alphabetically. However, two recently added functions are not in the correct location. This PR simply corrects that ordering.
The ordering of one entry was also corrected in libs/libc/libc.csv. Same issue.
This change is only cosmetic.
Verified only by CI
2021-05-31 21:15:36 -05:00
Xiang Xiao
d7f96003cf
Don't include debug.h from public header file
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-01 06:42:02 +09:00
Alin Jerpelea
aa4e80cf69
libs: libxx: update licenses to Apache
...
Gregory Nutt is the copyright holder for those files and he has submitted the
SGA as a result we can migrate the licenses to Apache.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-05-27 08:07:25 +09:00
Alin Jerpelea
c6252c9e32
libs: libc: update licenses to Apache
...
Gregory Nutt is the copyright holder for those files and he has submitted the
SGA as a result we can migrate the licenses to Apache.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-05-27 08:07:25 +09:00
YAMAMOTO Takashi
0a604d7edd
libs/libc/libc.h: Fix a comment typo
2021-05-24 21:54:54 -05:00
Xiang Xiao
001e7c3e76
sched: Don't include nuttx/sched.h inside sched.h
...
But let nuttx/sched.h include sched.h instead to
avoid expose nuttx kernel API to userspace.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-05-24 12:11:53 +09:00
Huang Qi
d374d55926
pthread: Implement destructor of pthread_key_create
...
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Change-Id: I6aafba9680257cba071bf1f72ae2ec2c475f5fb0
2021-05-21 22:46:52 -06:00
Huang Qi
f4a0b7aedd
libc: Call pthread_exit in user-space by up_pthread_exit
...
Drop to user-space in kernel/protected build with up_pthread_exit,
now all pthread_cleanup functions executed in user mode.
* A new syscall SYS_pthread_exit added
* A new tcb flag TCB_FLAG_CANCEL_DOING added
* up_pthread_exit implemented for riscv/arm arch
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2021-05-21 22:46:52 -06:00
Huang Qi
81a01d089b
libc/pthread: Fix comment and document issue
...
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2021-05-21 22:46:52 -06:00
Huang Qi
f1a92e9cbb
libc: Move pthread_cleanup to user space
...
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2021-05-21 22:46:52 -06:00
Huang Qi
54eef9f639
libc: Move pthread_exit to userspace
...
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2021-05-21 22:46:52 -06:00
Gregory Nutt
bb9b58bdde
libc: Move pthread_create to user space
...
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Change-Id: I5c447d94077debc79158686935f288e4c8e51e01
2021-05-21 22:46:52 -06:00
Xiang Xiao
a81166aef6
Update libcxx to 12.0.0 release
...
and remove the temporary patch since all patch is in the mainline now
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-05-16 01:18:41 -07:00