~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/my_pthread.h

  • Committer: Eric Day
  • Date: 2009-10-31 21:53:33 UTC
  • mfrom: (1200 staging)
  • mto: This revision was merged to the branch mainline in revision 1202.
  • Revision ID: eday@oddments.org-20091031215333-j94bjoanwmi68p6f
Merged trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
 
16
16
/* Defines to make different thread packages compatible */
17
17
 
18
 
#ifndef _my_pthread_h
19
 
#define _my_pthread_h
 
18
#ifndef MYSYS_MY_PTHREAD_H
 
19
#define MYSYS_MY_PTHREAD_H
20
20
 
21
21
#include <stdint.h>
22
22
#include <unistd.h>
143
143
 
144
144
        /* READ-WRITE thread locking */
145
145
 
146
 
#ifndef HAVE_THR_SETCONCURRENCY
147
 
#define thr_setconcurrency(A) pthread_dummy(0)
148
 
#endif
149
146
#if !defined(HAVE_PTHREAD_ATTR_SETSTACKSIZE) && ! defined(pthread_attr_setstacksize)
150
147
#define pthread_attr_setstacksize(A,B) pthread_dummy(0)
151
148
#endif
157
154
#else
158
155
#define MY_MUTEX_INIT_FAST   NULL
159
156
#endif
160
 
#ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
161
 
extern pthread_mutexattr_t my_errorcheck_mutexattr;
162
 
#define MY_MUTEX_INIT_ERRCHK &my_errorcheck_mutexattr
163
 
#else
164
 
#define MY_MUTEX_INIT_ERRCHK   NULL
165
 
#endif
166
157
 
167
158
#ifndef ESRCH
168
159
/* Define it to something */
179
170
 
180
171
/* All thread specific variables are in the following struct */
181
172
 
182
 
#define THREAD_NAME_SIZE 10
183
173
/*
184
174
  Drizzle can survive with 32K, but some glibc libraries require > 128K stack
185
175
  to resolve hostnames. Also recursive stored procedures needs stack.
259
249
#ifdef  __cplusplus
260
250
}
261
251
#endif
262
 
#endif /* _my_ptread_h */
 
252
#endif /* MYSYS_MY_PTHREAD_H */