Skip to content

Commit

Permalink
esp-idf: Support multi-threading
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdeep1 committed May 22, 2024
1 parent 180e822 commit e8e44bf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/coap3/coap_mutex_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,13 @@ typedef pthread_mutex_t coap_mutex_t;
#define coap_mutex_lock(a) pthread_mutex_lock(a)
#define coap_mutex_trylock(a) pthread_mutex_trylock(a)
#define coap_mutex_unlock(a) pthread_mutex_unlock(a)
#if defined(ESPIDF_VERSION)
#define coap_thread_pid_t TaskHandle_t
#define coap_thread_pid xTaskGetCurrentTaskHandle()
#else /* !ESPIDF_VERSION */
#define coap_thread_pid_t pthread_t
#define coap_thread_pid pthread_self()
#endif /* !ESPIDF_VERSION */

#elif defined(RIOT_VERSION)
/* use RIOT's mutex API */
Expand Down

0 comments on commit e8e44bf

Please sign in to comment.