Fix issue in multi-thread sample (#1458)

Set `WAMR_BUILD_LIB_PTHREAD_SEMAPHORE` for the sample,
and update document.
This commit is contained in:
Xu Jun 2022-09-07 12:56:50 +08:00 committed by GitHub
parent 729c4aeeaa
commit 5722fcc40a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 1 deletions

View File

@ -59,7 +59,7 @@ bh_list_init(bh_list *list);
* <code>BH_LIST_ERROR</code> if input is invalid or no memory
* available.
*/
extern bh_list_status
bh_list_status
bh_list_insert(bh_list *list, void *elem);
/**

View File

@ -77,6 +77,10 @@ cmake -DWAMR_BUILD_PLATFORM=linux -DWAMR_BUILD_TARGET=ARM
- **WAMR_BUILD_LIB_PTHREAD**=1/0, default to disable if not set
> Note: The dependent feature of lib pthread such as the `shared memory` and `thread manager` will be enabled automatically.
#### **Enable lib-pthread-semaphore**
- **WAMR_BUILD_LIB_PTHREAD_SEMAPHORE**=1/0, default to disable if not set
> Note: This feature depends on `lib-pthread`, it will be enabled automatically if this feature is enabled.
#### **Disable boundary check with hardware trap in AOT or JIT mode**
- **WAMR_DISABLE_HW_BOUND_CHECK**=1/0, default to enable if not set and supported by platform
> Note: by default only platform linux/darwin/android/vxworks 64-bit will enable boundary check with hardware trap in AOT or JIT mode, and the wamrc tool will generate AOT code without boundary check instructions in all 64-bit targets except SGX to improve performance.

View File

@ -45,6 +45,7 @@ set(WAMR_BUILD_JIT 0)
set(WAMR_BUILD_LIBC_BUILTIN 1)
set(WAMR_BUILD_FAST_INTERP 1)
set(WAMR_BUILD_LIB_PTHREAD 1)
set(WAMR_BUILD_LIB_PTHREAD_SEMAPHORE 1)
# compiling and linking flags
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie -fPIE")