Fixed ltp_stress_mqueues_multi_send_rev_1 test issue:
In SMP mode, tg_members will operate on different cores.
Adding interrupt locking operations ensures that the operation
of tg_members will not be interrupted by other cores.
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
Resolving the issue with the ltp_interfaces_pthread_join_6_2 test case.
In SMP mode, the pthread may still be in the process of exiting when
pthread_join returns, and calling pthread_join again at this time will
result in an error. The error code returned should be ESRCH.
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
Use sigandset function instead of & operation,
because the sigset_t structure has been changed.
This PR is to adapt to the changes made in #8885.
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
In many cases, it is legal for the child process to use the fd
created by the parent process,
so to improve compatibility, we allow the child process
to use the fd of the Parent process.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
USBD has many limitation that make it hard to work properly:
- only one EasyDMA channel which must be shared for all EPs
- only one DMA transfer can take place at a time
- some registers are unavailable during DMA transfer
- in case of any problems, the peripheral silently blocks,
or lose the transmitted bytes without information for the user
This commit is trying to fix these problem and makes the USBS stack more reliable.
Tested with high-speed CDCACM data transfers and that's the best I've been able to get in terms of stability.
use PTHREAD_CLEANUP_STACKSIZE to enable or disable interfaces pthread_cleanup_push() and pthread_cleanup_pop().
reasons:(1)same as TLS_TASK_NELEM (2)it is no need to use two variables
Signed-off-by: yanghuatao <yanghuatao@xiaomi.com>
we will integrate network management tools in future projects. In the
process of porting the tools, we encounter some situations where the
structure is not defined, refer to the common implementation of other
systems and add relevant definitions.
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
if config_walltime_signal is enabled, NuttX_sim will receive a lot of
signals, the socket api will break and errno will be EINTR, masking irq
before calling the host socket api will avoid this problem.
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
the previous patch can not handle the revent is POLLHUP or POLLERR,
poll_setup needs to be executed only when the POLLIN or POLLOUT event
changes.
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
There is no control over whether a valid index is input when user use
ioctl to get netdev information, so removing this assertion will allow
ENODEV to be returned.
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
In SMP mode, the fpu owner may switch from core0 to core1,
so it is necessary to force saving the FPU context when a
context switch occurs.
This PR fixed the crash issue mentioned in #8799.
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
Test on sim/nsh:
(CONFIG_DEBUG_ASSERTIONS=y CONFIG_DEFAULT_SMALL=y)
text data bss dec hex filename
423626 27152 4128 454906 6f0fa nuttx /* before */
417010 27152 4128 448290 6d722 nuttx /* after */
-6616
Signed-off-by: chao an <anchao@xiaomi.com>
In embedded development environments, due to the lack of address isolation between processes,
fd may be passed between processes and lead to misuse,
We have designed an fd cross-process automatic detection tool,
fdcheck_protect returns the fd containing the pid information,
indicating that the ownership of the current fd belongs to the pid and is not allowed to be used by other processes.
fdcheck_restore will obtain the true fd and check if the ownership of the fd is legal
For ease of understanding, let's give an example where
the following information is represented in 32-bit binary format
fd 00000000 00000000 00000000 10001010
pid 00000000 00000000 00000011 01010101
ret 00000000 00000011 01010101 10001010
Signed-off-by: hujun5 <hujun5@xiaomi.com>