mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-10-20 22:31:30 +08:00
Revert "Merge branch 'feature/support_gcc_v8.x' into 'master'"
This reverts merge request !1539
This commit is contained in:
@@ -1,11 +1,15 @@
|
||||
if(CONFIG_ENABLE_PTHREAD)
|
||||
idf_component_register(SRCS "pthread.c"
|
||||
"pthread_cond_var.c"
|
||||
"pthread_local_storage.c"
|
||||
INCLUDE_DIRS include)
|
||||
INCLUDE_DIRS include
|
||||
PRIV_REQUIRES newlib)
|
||||
|
||||
set(extra_link_flags "-u pthread_include_pthread_impl")
|
||||
list(APPEND extra_link_flags "-u pthread_include_pthread_cond_impl")
|
||||
list(APPEND extra_link_flags "-u pthread_include_pthread_local_storage_impl")
|
||||
if(GCC_NOT_5_2_0)
|
||||
set(extra_link_flags "-u pthread_include_pthread_impl")
|
||||
list(APPEND extra_link_flags "-u pthread_include_pthread_cond_impl")
|
||||
list(APPEND extra_link_flags "-u pthread_include_pthread_local_storage_impl")
|
||||
endif()
|
||||
|
||||
if(CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP)
|
||||
target_link_libraries(${COMPONENT_LIB} "-Wl,--wrap=vPortCleanUpTCB")
|
||||
@@ -14,3 +18,6 @@ endif()
|
||||
if(extra_link_flags)
|
||||
target_link_libraries(${COMPONENT_LIB} INTERFACE "${extra_link_flags}")
|
||||
endif()
|
||||
else()
|
||||
register_component()
|
||||
endif()
|
@@ -1,27 +1,37 @@
|
||||
menu "PThreads"
|
||||
|
||||
config ENABLE_PTHREAD
|
||||
bool "Enable Pthread"
|
||||
default y
|
||||
help
|
||||
Enable this option and then pthread is to be used.
|
||||
|
||||
config PTHREAD_TASK_PRIO_DEFAULT
|
||||
int "Default task priority"
|
||||
range 0 255
|
||||
default 5
|
||||
depends on ENABLE_PTHREAD
|
||||
help
|
||||
Priority used to create new tasks with default pthread parameters.
|
||||
|
||||
config PTHREAD_TASK_STACK_SIZE_DEFAULT
|
||||
int "Default task stack size"
|
||||
default 3072
|
||||
depends on ENABLE_PTHREAD
|
||||
help
|
||||
Stack size used to create new tasks with default pthread parameters.
|
||||
|
||||
config PTHREAD_STACK_MIN
|
||||
int "Minimum allowed pthread stack size"
|
||||
default 768
|
||||
depends on ENABLE_PTHREAD
|
||||
help
|
||||
Minimum allowed pthread stack size set in attributes passed to pthread_create
|
||||
|
||||
config PTHREAD_TASK_NAME_DEFAULT
|
||||
string "Default name of pthreads"
|
||||
default "pthread"
|
||||
depends on ENABLE_PTHREAD
|
||||
help
|
||||
The default name of pthreads.
|
||||
|
||||
|
@@ -2,6 +2,7 @@
|
||||
# Component Makefile
|
||||
#
|
||||
|
||||
ifdef CONFIG_ENABLE_PTHREAD
|
||||
COMPONENT_SRCDIRS := .
|
||||
|
||||
COMPONENT_ADD_INCLUDEDIRS := include
|
||||
@@ -19,3 +20,6 @@ COMPONENT_ADD_LDFLAGS += -u pthread_include_pthread_impl
|
||||
COMPONENT_ADD_LDFLAGS += -u pthread_include_pthread_cond_impl
|
||||
COMPONENT_ADD_LDFLAGS += -u pthread_include_pthread_local_storage_impl
|
||||
endif # GCC_NOT_5_2_0
|
||||
else
|
||||
COMPONENT_SRCDIRS :=
|
||||
endif
|
||||
|
@@ -78,17 +78,6 @@ static void esp_pthread_cfg_key_destructor(void *value)
|
||||
free(value);
|
||||
}
|
||||
|
||||
int pthread_condattr_setclock(pthread_condattr_t *attr, clockid_t clock_id)
|
||||
{
|
||||
ESP_LOGW(TAG, "%s: not yet supported!", __func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int pthread_setcancelstate(int state, int *oldstate)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
esp_err_t esp_pthread_init(void)
|
||||
{
|
||||
if (pthread_key_create(&s_pthread_cfg_key, esp_pthread_cfg_key_destructor) != 0) {
|
||||
|
Reference in New Issue
Block a user