Support more features for rt-thread (#3661)
1, enable thread mgr 2, enable libc wasi 3, enable libc wasi threads 4, specify a function name of the module to run rather main
This commit is contained in:
committed by
GitHub
parent
4dfdbbb5a5
commit
6e727dc18d
20
core/shared/platform/common/libc-util/SConscript
Normal file
20
core/shared/platform/common/libc-util/SConscript
Normal file
@ -0,0 +1,20 @@
|
||||
#
|
||||
# Copyright 2024 Sony Semiconductor Solutions Corporation.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
#
|
||||
|
||||
from building import *
|
||||
import re
|
||||
|
||||
Import('rtconfig')
|
||||
|
||||
cwd = GetCurrentDir()
|
||||
src = Split('''
|
||||
libc_errno.c
|
||||
''')
|
||||
CPPPATH = [cwd]
|
||||
|
||||
group = DefineGroup('iwasm_libc_util', src, depend = [''], CPPPATH = CPPPATH)
|
||||
|
||||
Return('group')
|
||||
20
core/shared/platform/common/posix/SConscript
Normal file
20
core/shared/platform/common/posix/SConscript
Normal file
@ -0,0 +1,20 @@
|
||||
#
|
||||
# Copyright 2024 Sony Semiconductor Solutions Corporation.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
#
|
||||
|
||||
from building import *
|
||||
import re
|
||||
|
||||
Import('rtconfig')
|
||||
|
||||
cwd = GetCurrentDir()
|
||||
src = Split('''
|
||||
posix_file.c
|
||||
''')
|
||||
CPPPATH = [cwd]
|
||||
|
||||
group = DefineGroup('iwasm_common_posix', src, depend = [''], CPPPATH = CPPPATH)
|
||||
|
||||
Return('group')
|
||||
@ -26,7 +26,7 @@
|
||||
* (platform_internal.h)
|
||||
*/
|
||||
#if !defined(CONFIG_HAS_D_INO)
|
||||
#if !defined(__NuttX__)
|
||||
#if !defined(__NuttX__) && !defined(__RTTHREAD__)
|
||||
#define CONFIG_HAS_D_INO 1
|
||||
#define CONFIG_HAS_ISATTY 1
|
||||
#else
|
||||
|
||||
@ -4,8 +4,10 @@
|
||||
*/
|
||||
|
||||
#ifndef _GNU_SOURCE
|
||||
#if !defined(__RTTHREAD__)
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
#endif
|
||||
#include "platform_api_vmcore.h"
|
||||
#include "platform_api_extension.h"
|
||||
|
||||
@ -448,7 +450,7 @@ os_thread_get_stack_boundary()
|
||||
addr += guard_size;
|
||||
}
|
||||
(void)stack_size;
|
||||
#elif defined(__APPLE__) || defined(__NuttX__)
|
||||
#elif defined(__APPLE__) || defined(__NuttX__) || defined(__RTTHREAD__)
|
||||
if ((addr = (uint8 *)pthread_get_stackaddr_np(self))) {
|
||||
stack_size = pthread_get_stacksize_np(self);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user