-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'contrib/github_pr_14339' into 'master'
Fix(pthread): Added linux port with empty functions to make pthread cxx example build. (GitHub PR) Closes IDFGH-13424 and IDFGH-13433 See merge request espressif/esp-idf!32785
- Loading branch information
Showing
4 changed files
with
54 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
/* | ||
* pthread port for Linux build | ||
*/ | ||
|
||
#include "esp_pthread.h" | ||
#include <string.h> | ||
|
||
/** | ||
* @brief Creates a default pthread configuration based | ||
* on the values set via menuconfig. | ||
* | ||
* @return | ||
* A default configuration structure. | ||
*/ | ||
esp_pthread_cfg_t esp_pthread_get_default_config(void) | ||
{ | ||
esp_pthread_cfg_t cfg = { | ||
.stack_size = CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT, | ||
.prio = CONFIG_PTHREAD_TASK_PRIO_DEFAULT, | ||
.inherit_cfg = false, | ||
.thread_name = NULL, | ||
.pin_to_core = 0, | ||
.stack_alloc_caps = 0, | ||
}; | ||
|
||
return cfg; | ||
} | ||
|
||
esp_err_t esp_pthread_set_cfg(const esp_pthread_cfg_t *cfg) | ||
{ | ||
return ESP_OK; | ||
} | ||
|
||
esp_err_t esp_pthread_get_cfg(esp_pthread_cfg_t *p) | ||
{ | ||
memset(p, 0, sizeof(*p)); | ||
return ESP_ERR_NOT_FOUND; | ||
} |
3 changes: 2 additions & 1 deletion
3
tools/test_apps/linux_compatible/generic_build_test/main/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
idf_component_register(SRCS "generic_build_test.c" | ||
INCLUDE_DIRS ".") | ||
INCLUDE_DIRS "." | ||
PRIV_REQUIRES pthread) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d7ca8b9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi I just pulled it from main and I don't see my name as contributor:
d7ca8b9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cristianfunes79 d7ca8b9 is a merge commit. The commit you have authored is one of the two parent commits of the merge: d3ab90b.
d7ca8b9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see it thanks!