CC: binfmt_unregister.c "fpu.c", line 98: warning #1160-D: a reduction in alignment without the
"packed" attribute is ignored
uintptr_t save1[XCPTCONTEXT_REGS] aligned_data(XCPTCONTEXT_ALIGN);
^
"fpu.c", line 99: warning #1160-D: a reduction in alignment without the
"packed" attribute is ignored
uintptr_t save2[XCPTCONTEXT_REGS] aligned_data(XCPTCONTEXT_ALIGN);
^
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
As per the `HAVE_FPU` in `fpu.c`, fpu_test is only available for
FLAT build. So user_main should enable fpu_test for FLAT build also,
otherwise ostest will fail for PROTECTED build.
Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
some architectures requires FPU context to be aligned,
for example x86-64 when used with XSAVE instruction must be aligned to 64
Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
This reverts commit 69e497f681.
In order to ensure the detached thread obtain the correct return
value from pthread_join()/pthread_cancel(), the detached thread
will create joininfo to save the detached status after thread
destroyed. If there are too many of detached threads in the
process group, the joininfo will consume too much memory.
This is not friendly to embedded MCU devices.
This commit keep the semantics as #11898 was introduced,
will no longer save joininfo for detached threads to avoid wasting memory.
Refer PR:
https://github.com/apache/nuttx/pull/12106
Signed-off-by: chao an <anchao@lixiang.com>
task_* APIs are unavailable in kernel build mode, replacing with
posix_spawn or pthread_* API to pass the case. But posix_spawn requires
some dependency, for example CONFIG_BUILTIN and CONFIG_LIBC_EXECFUNCS,
so pthread_* APIs are used in most scenarios. Some tests should be
re-visited because the intent is to user another task (in this case
another process) to e.g. receive signals.
That will require quite a bit of extra work.
Tests that had to be disabled:
- restart: task_restart() does not work at all with kernel mode so it is
disabled entirely
- fpu: make sure the FPU test is not even attempted, because it will cause
ASSERT() and stop the test
- vfork: vfork() does not work for some reason in CONFIG_BUILD_KERNEL,
there is something missing on the kernel side, so just disable the test for now
Tests that should be re-visited:
- The signal tests, now they signal the process itself while before the
signal was sent to another task. This will require building the part
that receives the signal as a separate process
- waitpid: Like stated above, waitpid does not work for pthreads
- suspend: kill to send signal does not work for pthreads
Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
Co-authored-by: Ville Juven <ville.juven@unikie.com>
Summary:
- Resolves an issue where `vfork_test` was not executed following
the renaming from CONFIG_ARCH_HAVE_VFORK to CONFIG_ARCH_HAVE_FORK,
as detailed in https://github.com/apache/nuttx/pull/9755.
Impact:
- Please merge https://github.com/apache/nuttx/pull/11200 before
merging this PR.
Testing:
- Successfully tested with rv-virt:smp64, spresense:smp, and sim:smp.
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
1. SIGSTOP and SIGKILL should not be used as test. In g_some_signals,
SIGKILL is used.
2. The SIGSTOP and SIGKILL flags of current task are set so we need to
delete them.
problem: ostest may fail at procmask test, because signals:sigkill/sigstop should not be added in signal mask
solution: skip checking whether sigkill/sigstop are in signal mask
Signed-off-by: guanyi <guanyi@xiaomi.com>
in project nuttx "remove PTHREAD_CLEANUP, and use PTHREAD_CLEANUP_STACKSIZE to enable or disable interfaces pthread_cleanup_push() and pthread_cleanup_pop()", project apps also needes adjust code.
Signed-off-by: yanghuatao <yanghuatao@xiaomi.com>
If the same signal is quickly repeated multiple times, the signal may be ignored.
In SMP since we cannot control thread scheduling to ensure timely signal processing,
it is best to use semaphores to wait for signal processing to complete, which can also shorten the ostest time
Signed-off-by: hujun5 <hujun5@xiaomi.com>