mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
Haiku doesn't support pthread_set_name_np yet
This commit is contained in:
parent
12fefdd7b1
commit
eb1a8d72fe
@ -504,6 +504,8 @@ extern int pthread_setname_np(const char *name);
|
|||||||
void pthread_set_name_np(pthread_t tid, const char *name);
|
void pthread_set_name_np(pthread_t tid, const char *name);
|
||||||
#elif defined(__NetBSD__)
|
#elif defined(__NetBSD__)
|
||||||
// pthread.h provides the symbol
|
// pthread.h provides the symbol
|
||||||
|
#elif defined(__HAIKU__)
|
||||||
|
// Haiku doesn't support pthread_set_name_np yet
|
||||||
#else
|
#else
|
||||||
// Need _GNU_SOURCE for pthread_setname_np on linux and that causes other issues on systems with old glibc
|
// Need _GNU_SOURCE for pthread_setname_np on linux and that causes other issues on systems with old glibc
|
||||||
extern int pthread_setname_np(pthread_t, const char *name);
|
extern int pthread_setname_np(pthread_t, const char *name);
|
||||||
@ -514,8 +516,8 @@ extern int pthread_setname_np(pthread_t, const char *name);
|
|||||||
static PyObject*
|
static PyObject*
|
||||||
set_thread_name(PyObject *self, PyObject *args) {
|
set_thread_name(PyObject *self, PyObject *args) {
|
||||||
(void)(self); (void)(args);
|
(void)(self); (void)(args);
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER) || defined(__HAIKU__)
|
||||||
PyErr_SetString(PyExc_RuntimeError, "Setting thread names not supported on Windows");
|
PyErr_SetString(PyExc_RuntimeError, "Setting thread names not supported on on this platform");
|
||||||
return NULL;
|
return NULL;
|
||||||
#else
|
#else
|
||||||
char *name;
|
char *name;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user