Eneboo - Documentación para desarrolladores
src/libmysql_std/include/my_no_pthread.h
Ir a la documentación de este archivo.
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; version 2 of the License.
00006 
00007    This program is distributed in the hope that it will be useful,
00008    but WITHOUT ANY WARRANTY; without even the implied warranty of
00009    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010    GNU General Public License for more details.
00011 
00012    You should have received a copy of the GNU General Public License
00013    along with this program; if not, write to the Free Software
00014    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
00015 
00016 
00017 #if !defined(_my_no_pthread_h) && !defined(THREAD)
00018 #define _my_no_pthread_h
00019 
00020 
00021 /*
00022   This block is to access some thread-related type definitions
00023   even in builds which do not need thread functions,
00024   as some variables (based on these types) are declared
00025   even in non-threaded builds.
00026   Case in point: 'mf_keycache.c'
00027 */
00028 #if defined(__WIN__) || defined(OS2)
00029 
00030 #elif defined(HAVE_UNIXWARE7_THREADS)
00031 /* #include <thread.h>   Currently, not relevant. Enable if needed. */
00032 
00033 #else /* Normal threads */
00034 #include <pthread.h>
00035 
00036 #endif /* defined(__WIN__) */
00037 
00038 
00039 /*
00040   This undefs some pthread mutex locks when one isn't using threads
00041   to make thread safe code, that should also work in single thread
00042   environment, easier to use.
00043 */
00044 #define pthread_mutex_init(A,B)
00045 #define pthread_mutex_lock(A)
00046 #define pthread_mutex_unlock(A)
00047 #define pthread_mutex_destroy(A)
00048 #define my_rwlock_init(A,B)
00049 #define rw_rdlock(A)
00050 #define rw_wrlock(A)
00051 #define rw_unlock(A)
00052 #define rwlock_destroy(A)
00053 
00054 #endif
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'