Mac build break fixes
Former-commit-id: 083b54472c65239b03c8a17f6b1ae6447d273e9a
This commit is contained in:
parent
ef5bf1fdd7
commit
1b29ba5873
@ -256,7 +256,10 @@ void setproctitle(const char *fmt, ...);
|
|||||||
#define redis_set_thread_title(name) rename_thread(find_thread(0), name)
|
#define redis_set_thread_title(name) rename_thread(find_thread(0), name)
|
||||||
#else
|
#else
|
||||||
#if (defined __APPLE__ && defined(MAC_OS_X_VERSION_10_7))
|
#if (defined __APPLE__ && defined(MAC_OS_X_VERSION_10_7))
|
||||||
extern "C" int pthread_setname_np(const char *name);
|
#ifdef __cplusplus
|
||||||
|
extern "C"
|
||||||
|
#endif
|
||||||
|
int pthread_setname_np(const char *name);
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#define redis_set_thread_title(name) pthread_setname_np(name)
|
#define redis_set_thread_title(name) pthread_setname_np(name)
|
||||||
#else
|
#else
|
||||||
|
@ -304,6 +304,10 @@ uint64_t fastlock_getlongwaitcount()
|
|||||||
|
|
||||||
extern "C" void fastlock_sleep(fastlock *lock, pid_t pid, unsigned wake, unsigned myticket)
|
extern "C" void fastlock_sleep(fastlock *lock, pid_t pid, unsigned wake, unsigned myticket)
|
||||||
{
|
{
|
||||||
|
UNUSED(lock);
|
||||||
|
UNUSED(pid);
|
||||||
|
UNUSED(wake);
|
||||||
|
UNUSED(myticket);
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
g_dlock.registerwait(lock, pid);
|
g_dlock.registerwait(lock, pid);
|
||||||
unsigned mask = (1U << (myticket % 32));
|
unsigned mask = (1U << (myticket % 32));
|
||||||
|
@ -94,3 +94,4 @@ struct fastlock
|
|||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
static_assert(offsetof(struct fastlock, m_ticket) == 64, "ensure padding is correct");
|
static_assert(offsetof(struct fastlock, m_ticket) == 64, "ensure padding is correct");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user