CC: serial/serial_io.c "/mnt/yang/qixinwei_vela_warnings_04_23/nuttx/include/nuttx/power/regulator.h", line 227: warning #231-D:
declaration is not visible outside of function
int regulator_gpio_init(FAR struct ioexpander_dev_s *iodev,
Signed-off-by: yanghuatao <yanghuatao@xiaomi.com>
"/mnt/yang/qixinwei_vela_warnings_04_23/nuttx/include/sys/types.h", line 319: warning #228-D:
trailing comma is nonstandard
OK = 0,
^
"/mnt/yang/qixinwei_vela_warnings_04_23/nuttx/include/sys/types.h", line 319: warning #228-D:
trailing comma is nonstandard
OK = 0,
^
"/mnt/yang/qixinwei_vela_warnings_04_23/nuttx/include/sys/types.h", line 319: warning #228-D:
trailing comma is nonstandard
OK = 0,
^
"/mnt/yang/qixinwei_vela_warnings_04_23/nuttx/include/sys/types.h", line 319: warning #228-D:
trailing comma is nonstandard
OK = 0,
^
"/mnt/yang/qixinwei_vela_warnings_04_23/nuttx/include/sys/types.h", line 319: warning #228-D:
trailing comma is nonstandard
OK = 0,
^
"/mnt/yang/qixinwei_vela_warnings_04_23/nuttx/include/sys/types.h", line 319: warning #228-D:
trailing comma is nonstandard
OK = 0,
^
"/mnt/yang/qixinwei_vela_warnings_04_23/nuttx/include/sys/types.h", line 319: warning #228-D:
trailing comma is nonstandard
OK = 0,
Signed-off-by: yanghuatao <yanghuatao@xiaomi.com>
"/mnt/yang/qixinwei_cmake/nuttx/sched/sched/sched_removeblocked.c", line 58: warning #188-D:
enumerated type mixed with another type
tstate_t task_state = btcb->task_state;
"/mnt/yang/qixinwei_cmake/nuttx/sched/sched/sched_setpriority.c", line 243: warning #188-D:
enumerated type mixed with another type
tstate_t task_state = tcb->task_state;
Signed-off-by: yanghuatao <yanghuatao@xiaomi.com>
After changing sp, following functions calling will result
in unpredictable behavior in case of jumping
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
when tcp socket stays in TCP_FIN_WAIT_1 or TCP_FIN_WAIT_2,not actively calling tcp_close_eventhandler,can reuslt in some TCP socket being set to a closed state,but nofosegs are not directly released,leading to IOB resource leakage.
Signed-off-by: wangchen <wangchen41@xiaomi.com>
If the device's CPU resources are scarce and unable to execute the
ip_fragin_timerwork callback in a timely manner, this assert will
be triggered. This is a normal scenario that can occur. The logic
should be modified to wait for the ip_fragin_timerwork to be
executed if it has not been executed yet.
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
Wait for CMDDONE in esp32s3_waitresponse even an error response is received.
Otherwise, the CMDDONE event of this command will disrupt later command.
Signed-off-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
Reviewed-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Reviewed-by: Jacky Cao <Jacky.Cao@sony.com>
Tested-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
The main objective is to determine if the examples really work or if they have been obsoleted.
The languages included in the list promote good interoperability with the NuttX API (C predominant).
This will show if they are worth integrating in NuttX.
**FFI method**
- Rust: bindgen or c2rust
- D: importC
- Swift: Bridging header or clang modulemap.
- Zig: `@cImport/@cInclude` or translate-c
This is a memory monitoring interface implemented with reference to Linux's PSI (Pressure Stall Information),
which can send notifications when the system's remaining memory is below the threshold.
The following example code sets two different thresholds.
When the system memory is below 10MB, a notification is triggered.
When the system memory is below 20 MB, a notification (POLLPRI event) is triggered every 1s.
```
int main(int argc, FAR char *argv[])
{
struct pollfd fds[2];
int ret;
if (argc == 2)
{
char *ptr = malloc(1024*1024*atoi(argv[1]));
printf("Allocating %d MB\n", atoi(argv[1]));
ptr[0] = 0;
return 0;
}
fds[0].fd = open("/proc/pressure/memory", O_RDWR);
fds[1].fd = open("/proc/pressure/memory", O_RDWR);
fds[0].events = POLLPRI;
fds[1].events = POLLPRI;
dprintf(fds[0].fd, "%llu -1", 1024LLU*1024 * 10);
dprintf(fds[1].fd, "%llu 1000000", 1024LLU*1024 * 20);
while (1)
{
ret = poll(fds, 2, -1);
if (ret > 0)
{
printf("Memory pressure: POLLPRI, %d\n", ret);
}
}
return 0;
}
```
https://docs.kernel.org/accounting/psi.html
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
If failed in pty_register2, it is possible to enter unregister_driver
function, which eventually calls ptmx_minor_free, resulting in mutex
conflict.
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
For some case, need large files from tmpfs or shmfs, will lead to high
pressure on memory fragments, add an optional fs_heap with independent
heap will benifit for memory fragments issue.
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
Only in the non-critical region, nuttx can the respond to the irq and not hold the lock
When returning from the irq, there is no need to check whether the lock needs to be released
we also need keep restore_critical_section in svc call
test:
Configuring NuttX and compile:
$ ./tools/configure.sh -l qemu-armv8a:nsh_smp
$ make
Running with qemu
$ qemu-system-aarch64 -cpu cortex-a53 -smp 4 -nographic \
-machine virt,virtualization=on,gic-version=3 \
-net none -chardev stdio,id=con,mux=on -serial chardev:con \
-mon chardev=con,mode=readline -kernel ./nuttx
Signed-off-by: hujun5 <hujun5@xiaomi.com>
"/home/guoshichao/work_profile/vela_os/vela_car_4/nuttx/include/nuttx/net/netdev.h", line 493: warning #231-D:
declaration is not visible outside of function
FAR struct netdev_ifaddr6_s *addr,
^
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
CC: irq/irq_initialize.c "ioexpander/gpio.c", line 386: warning #188-D: enumerated type mixed with
another type
*ptr = dev->gp_pintype;
^
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
"net/netdev_upperhalf.c", line 133: warning #188-D: enumerated type mixed with
another type
total += netdev_lower_quota_load(lower, type);
CC: dirent/lib_alphasort.c "spi/spi_transfer.c", line 83: warning #188-D: enumerated type mixed with
another type
SPI_SETMODE(spi, seq->mode);
^
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
CC: modlib/modlib_depend.c "modlib/modlib_bind.c", line 741: warning #186-D: pointless comparison of
unsigned integer with zero
if (rel->r_offset < 0)
^
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
[Desc]:We need to check the parameter passed to the kmm_zalloc(size_t) function.
If it exceeds the limit of size_t, we need to return an error directly to avoid further errors.
Signed-off-by: pengyinjie <pengyinjie@xiaomi.com>