mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'refactor/pthread_iram' into 'master'
pthread: removed IRAM code from pthread Closes IDF-7147 See merge request espressif/esp-idf!23213
This commit is contained in:
commit
852c60fee0
@ -595,7 +595,7 @@ int pthread_mutex_destroy(pthread_mutex_t *mutex)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int IRAM_ATTR pthread_mutex_lock_internal(esp_pthread_mutex_t *mux, TickType_t tmo)
|
static int pthread_mutex_lock_internal(esp_pthread_mutex_t *mux, TickType_t tmo)
|
||||||
{
|
{
|
||||||
if (!mux) {
|
if (!mux) {
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
@ -632,7 +632,7 @@ static int pthread_mutex_init_if_static(pthread_mutex_t *mutex)
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
int IRAM_ATTR pthread_mutex_lock(pthread_mutex_t *mutex)
|
int pthread_mutex_lock(pthread_mutex_t *mutex)
|
||||||
{
|
{
|
||||||
if (!mutex) {
|
if (!mutex) {
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
@ -644,7 +644,7 @@ int IRAM_ATTR pthread_mutex_lock(pthread_mutex_t *mutex)
|
|||||||
return pthread_mutex_lock_internal((esp_pthread_mutex_t *)*mutex, portMAX_DELAY);
|
return pthread_mutex_lock_internal((esp_pthread_mutex_t *)*mutex, portMAX_DELAY);
|
||||||
}
|
}
|
||||||
|
|
||||||
int IRAM_ATTR pthread_mutex_timedlock(pthread_mutex_t *mutex, const struct timespec *timeout)
|
int pthread_mutex_timedlock(pthread_mutex_t *mutex, const struct timespec *timeout)
|
||||||
{
|
{
|
||||||
if (!mutex) {
|
if (!mutex) {
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
@ -666,7 +666,7 @@ int IRAM_ATTR pthread_mutex_timedlock(pthread_mutex_t *mutex, const struct times
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
int IRAM_ATTR pthread_mutex_trylock(pthread_mutex_t *mutex)
|
int pthread_mutex_trylock(pthread_mutex_t *mutex)
|
||||||
{
|
{
|
||||||
if (!mutex) {
|
if (!mutex) {
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
@ -678,7 +678,7 @@ int IRAM_ATTR pthread_mutex_trylock(pthread_mutex_t *mutex)
|
|||||||
return pthread_mutex_lock_internal((esp_pthread_mutex_t *)*mutex, 0);
|
return pthread_mutex_lock_internal((esp_pthread_mutex_t *)*mutex, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int IRAM_ATTR pthread_mutex_unlock(pthread_mutex_t *mutex)
|
int pthread_mutex_unlock(pthread_mutex_t *mutex)
|
||||||
{
|
{
|
||||||
esp_pthread_mutex_t *mux;
|
esp_pthread_mutex_t *mux;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user