00001 /* Copyright (C) 2000 MySQL AB 00002 00003 This program is free software; you can redistribute it and/or modify 00004 it under the terms of the GNU General Public License as published by 00005 the Free Software Foundation; either version 2 of the License, or 00006 (at your option) any later version. 00007 00008 This program is distributed in the hope that it will be useful, 00009 but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00011 GNU General Public License for more details. 00012 00013 You should have received a copy of the GNU General Public License 00014 along with this program; if not, write to the Free Software 00015 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ 00016 00017 00018 #if !defined(_my_no_pthread_h) && !defined(THREAD) 00019 #define _my_no_pthread_h 00020 00021 00022 /* 00023 This block is to access some thread-related type definitions 00024 even in builds which do not need thread functions, 00025 as some variables (based on these types) are declared 00026 even in non-threaded builds. 00027 Case in point: 'mf_keycache.c' 00028 */ 00029 #if defined(__WIN__) 00030 #else /* Normal threads */ 00031 #include <pthread.h> 00032 00033 #endif /* defined(__WIN__) */ 00034 00035 00036 /* 00037 This undefs some pthread mutex locks when one isn't using threads 00038 to make thread safe code, that should also work in single thread 00039 environment, easier to use. 00040 */ 00041 #define pthread_mutex_init(A,B) 00042 #define pthread_mutex_lock(A) 00043 #define pthread_mutex_unlock(A) 00044 #define pthread_mutex_destroy(A) 00045 #define my_rwlock_init(A,B) 00046 #define rw_rdlock(A) 00047 #define rw_wrlock(A) 00048 #define rw_unlock(A) 00049 #define rwlock_destroy(A) 00050 00051 #endif
1.4.7

