Eneboo - Documentación para desarrolladores
src/pthreads/tests/benchtest.h
Ir a la documentación de este archivo.
00001 /*
00002  *
00003  *
00004  * --------------------------------------------------------------------------
00005  *
00006  *      Pthreads-win32 - POSIX Threads Library for Win32
00007  *      Copyright(C) 1998 John E. Bossom
00008  *      Copyright(C) 1999,2005 Pthreads-win32 contributors
00009  * 
00010  *      Contact Email: rpj@callisto.canberra.edu.au
00011  * 
00012  *      The current list of contributors is contained
00013  *      in the file CONTRIBUTORS included with the source
00014  *      code distribution. The list can also be seen at the
00015  *      following World Wide Web location:
00016  *      http://sources.redhat.com/pthreads-win32/contributors.html
00017  * 
00018  *      This library is free software; you can redistribute it and/or
00019  *      modify it under the terms of the GNU Lesser General Public
00020  *      License as published by the Free Software Foundation; either
00021  *      version 2 of the License, or (at your option) any later version.
00022  * 
00023  *      This library is distributed in the hope that it will be useful,
00024  *      but WITHOUT ANY WARRANTY; without even the implied warranty of
00025  *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00026  *      Lesser General Public License for more details.
00027  * 
00028  *      You should have received a copy of the GNU Lesser General Public
00029  *      License along with this library in the file COPYING.LIB;
00030  *      if not, write to the Free Software Foundation, Inc.,
00031  *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
00032  *
00033  */
00034 
00035 #include "../config.h"
00036 
00037 enum {
00038   OLD_WIN32CS,
00039   OLD_WIN32MUTEX
00040 };
00041 
00042 extern int old_mutex_use;
00043 
00044 struct old_mutex_t_ {
00045   HANDLE mutex;
00046   CRITICAL_SECTION cs;
00047 };
00048 
00049 typedef struct old_mutex_t_ * old_mutex_t;
00050 
00051 struct old_mutexattr_t_ {
00052   int pshared;
00053 };
00054 
00055 typedef struct old_mutexattr_t_ * old_mutexattr_t;
00056 
00057 extern BOOL (WINAPI *ptw32_try_enter_critical_section)(LPCRITICAL_SECTION);
00058 extern HINSTANCE ptw32_h_kernel32;
00059 
00060 #define PTW32_OBJECT_AUTO_INIT ((void *) -1)
00061 
00062 void dummy_call(int * a);
00063 void interlocked_inc_with_conditionals(int *a);
00064 void interlocked_dec_with_conditionals(int *a);
00065 int old_mutex_init(old_mutex_t *mutex, const old_mutexattr_t *attr);
00066 int old_mutex_lock(old_mutex_t *mutex);
00067 int old_mutex_unlock(old_mutex_t *mutex);
00068 int old_mutex_trylock(old_mutex_t *mutex);
00069 int old_mutex_destroy(old_mutex_t *mutex);
00070 /****************************************************************************************/
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'