mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
merge
This commit is contained in:
@@ -35,7 +35,6 @@ typedef DWORD pthread_t;
|
||||
typedef struct thread_attr {
|
||||
DWORD dwStackSize ;
|
||||
DWORD dwCreatingFlag ;
|
||||
int priority ;
|
||||
} pthread_attr_t ;
|
||||
|
||||
typedef struct { int dummy; } pthread_condattr_t;
|
||||
@@ -110,7 +109,6 @@ int pthread_cond_broadcast(pthread_cond_t *cond);
|
||||
int pthread_cond_destroy(pthread_cond_t *cond);
|
||||
int pthread_attr_init(pthread_attr_t *connect_att);
|
||||
int pthread_attr_setstacksize(pthread_attr_t *connect_att,DWORD stack);
|
||||
int pthread_attr_setprio(pthread_attr_t *connect_att,int priority);
|
||||
int pthread_attr_destroy(pthread_attr_t *connect_att);
|
||||
struct tm *localtime_r(const time_t *timep,struct tm *tmp);
|
||||
struct tm *gmtime_r(const time_t *timep,struct tm *tmp);
|
||||
@@ -143,20 +141,17 @@ int pthread_cancel(pthread_t thread);
|
||||
#define pthread_mutex_trylock(A) win_pthread_mutex_trylock((A))
|
||||
#define pthread_mutex_unlock(A) LeaveCriticalSection(A)
|
||||
#define pthread_mutex_destroy(A) DeleteCriticalSection(A)
|
||||
#define my_pthread_setprio(A,B) SetThreadPriority(GetCurrentThread(), (B))
|
||||
#define pthread_kill(A,B) pthread_dummy((A) ? 0 : ESRCH)
|
||||
|
||||
|
||||
/* Dummy defines for easier code */
|
||||
#define pthread_attr_setdetachstate(A,B) pthread_dummy(0)
|
||||
#define my_pthread_attr_setprio(A,B) pthread_attr_setprio(A,B)
|
||||
#define pthread_attr_setscope(A,B)
|
||||
#define pthread_detach_this_thread()
|
||||
#define pthread_condattr_init(A)
|
||||
#define pthread_condattr_destroy(A)
|
||||
#define pthread_yield() SwitchToThread()
|
||||
|
||||
#define my_pthread_getprio(thread_id) pthread_dummy(0)
|
||||
#define pthread_yield() SwitchToThread()
|
||||
#define my_sigset(A,B) signal(A,B)
|
||||
|
||||
#else /* Normal threads */
|
||||
@@ -185,8 +180,6 @@ void my_pthread_exit(void *status);
|
||||
#define pthread_exit(A) my_pthread_exit(A)
|
||||
#endif
|
||||
|
||||
extern int my_pthread_getprio(pthread_t thread_id);
|
||||
|
||||
#define pthread_key(T,V) pthread_key_t V
|
||||
#define my_pthread_getspecific_ptr(T,V) my_pthread_getspecific(T,(V))
|
||||
#define my_pthread_setspecific_ptr(T,V) pthread_setspecific(T,(void*) (V))
|
||||
@@ -258,32 +251,6 @@ int sigwait(sigset_t *setp, int *sigp); /* Use our implemention */
|
||||
#define my_sigset(A,B) signal((A),(B))
|
||||
#endif
|
||||
|
||||
#ifndef my_pthread_setprio
|
||||
#if defined(HAVE_PTHREAD_SETPRIO_NP) /* FSU threads */
|
||||
#define my_pthread_setprio(A,B) pthread_setprio_np((A),(B))
|
||||
#elif defined(HAVE_PTHREAD_SETPRIO)
|
||||
#define my_pthread_setprio(A,B) pthread_setprio((A),(B))
|
||||
#elif defined(HAVE_PTHREAD_SETSCHEDPRIO) && !defined (__GNUC__)
|
||||
/*
|
||||
Workaround for bug on Solaris where pthread.h have bug in GNU
|
||||
version of pthread.h => configure says yes, header files says
|
||||
no. So not used with gcc and issue is Solaris only, so will
|
||||
be used on Solaris using SunStudio.
|
||||
*/
|
||||
#define my_pthread_setprio(A,B) pthread_setschedprio((A),(B))
|
||||
#else
|
||||
extern void my_pthread_setprio(pthread_t thread_id,int prior);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef my_pthread_attr_setprio
|
||||
#ifdef HAVE_PTHREAD_ATTR_SETPRIO
|
||||
#define my_pthread_attr_setprio(A,B) pthread_attr_setprio((A),(B))
|
||||
#else
|
||||
extern void my_pthread_attr_setprio(pthread_attr_t *attr, int priority);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_PTHREAD_ATTR_SETSCOPE) || defined(HAVE_DEC_3_2_THREADS)
|
||||
#define pthread_attr_setscope(A,B)
|
||||
#undef HAVE_GETHOSTBYADDR_R /* No definition */
|
||||
|
Reference in New Issue
Block a user