2018-05-29 09:25:24 +00:00
|
|
|
#include <pthread.h>
|
|
|
|
#include "esp_log.h"
|
|
|
|
|
|
|
|
const static char *TAG = "esp32_asio_pthread";
|
|
|
|
|
2020-11-10 07:40:01 +00:00
|
|
|
int pthread_condattr_setclock(pthread_condattr_t *attr, clockid_t clock_id)
|
2018-05-29 09:25:24 +00:00
|
|
|
{
|
2019-11-07 11:07:44 +00:00
|
|
|
ESP_LOGW(TAG, "%s: not yet supported!", __func__);
|
2018-05-29 09:25:24 +00:00
|
|
|
return 0;
|
|
|
|
}
|
2019-03-08 07:07:00 +00:00
|
|
|
|
|
|
|
int pthread_setcancelstate(int state, int *oldstate)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2019-04-15 03:45:08 +00:00
|
|
|
|
2019-11-07 11:07:44 +00:00
|
|
|
// This functions (pthread_sigmask(), sigfillset) are called from ASIO::signal_blocker to temporarily silence signals
|
|
|
|
// Since signals are not yet supported in ESP pthread these functions serve as no-ops
|
|
|
|
//
|
|
|
|
int pthread_sigmask(int how, const sigset_t *restrict set, sigset_t *restrict oset)
|
|
|
|
{
|
|
|
|
ESP_LOGD(TAG, "%s: Signals not supported in ESP pthread", __func__);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
int sigfillset(sigset_t *what)
|
|
|
|
{
|
|
|
|
ESP_LOGD(TAG, "%s: Signals not supported in ESP pthread", __func__);
|
|
|
|
if (what != NULL) {
|
|
|
|
*what = ~0;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2019-07-16 09:33:30 +00:00
|
|
|
void newlib_include_pthread_impl(void)
|
2019-04-15 03:45:08 +00:00
|
|
|
{
|
|
|
|
// Linker hook, exists for no other purpose
|
|
|
|
}
|