2018-05-29 05:25:24 -04:00
|
|
|
#include <pthread.h>
|
|
|
|
#include "esp_log.h"
|
|
|
|
|
|
|
|
const static char *TAG = "esp32_asio_pthread";
|
|
|
|
|
2020-11-10 02:40:01 -05:00
|
|
|
int pthread_condattr_setclock(pthread_condattr_t *attr, clockid_t clock_id)
|
2018-05-29 05:25:24 -04:00
|
|
|
{
|
2019-11-07 06:07:44 -05:00
|
|
|
ESP_LOGW(TAG, "%s: not yet supported!", __func__);
|
2018-05-29 05:25:24 -04:00
|
|
|
return 0;
|
|
|
|
}
|
2019-03-08 02:07:00 -05:00
|
|
|
|
|
|
|
int pthread_setcancelstate(int state, int *oldstate)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2019-04-14 23:45:08 -04:00
|
|
|
|
2019-11-07 06:07:44 -05: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 05:33:30 -04:00
|
|
|
void newlib_include_pthread_impl(void)
|
2019-04-14 23:45:08 -04:00
|
|
|
{
|
|
|
|
// Linker hook, exists for no other purpose
|
|
|
|
}
|