gnunet-fuse

GNUnet file-sharing directory mounting via FUSE
Log | Files | Refs | Submodules | README | LICENSE

mutex.h (1721B)


      1 /*
      2      This file is part of GNUnet.
      3      Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2012 GNUnet e.V.
      4 
      5      GNUnet is free software; you can redistribute it and/or modify
      6      it under the terms of the GNU General Public License as published
      7      by the Free Software Foundation; either version 3, or (at your
      8      option) any later version.
      9 
     10      GNUnet is distributed in the hope that it will be useful, but
     11      WITHOUT ANY WARRANTY; without even the implied warranty of
     12      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     13      General Public License for more details.
     14 
     15      You should have received a copy of the GNU General Public License
     16      along with GNUnet; see the file COPYING.  If not, write to the
     17      Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
     18      Boston, MA 02110-1301, USA.
     19 */
     20 
     21 /**
     22  * @file src/fuse/mutex.h
     23  * @brief pthreads wapper and thread related services
     24  *
     25  * @author Christian Grothoff
     26  * @author Krista Bennett
     27  * @author Gerd Knorr <kraxel@bytesex.org>
     28  * @author Ioana Patrascu
     29  * @author Tzvetan Horozov
     30  */
     31 
     32 #ifndef MUTEX_H
     33 #define MUTEX_H
     34 
     35 #ifdef __cplusplus
     36 extern "C"
     37 {
     38 #if 0                           /* keep Emacsens' auto-indent happy */
     39 }
     40 #endif
     41 #endif
     42 
     43 
     44 /**
     45  * @brief Structure for MUTual EXclusion (Mutex).
     46  */
     47 struct GNUNET_Mutex;
     48 
     49 
     50 struct GNUNET_Mutex *
     51 GNUNET_mutex_create (int isRecursive);
     52 
     53 
     54 void
     55 GNUNET_mutex_destroy (struct GNUNET_Mutex *mutex);
     56 
     57 
     58 void
     59 GNUNET_mutex_lock (struct GNUNET_Mutex *mutex);
     60 
     61 
     62 void
     63 GNUNET_mutex_unlock (struct GNUNET_Mutex *mutex);
     64 
     65 
     66 #if 0                           /* keep Emacsens' auto-indent happy */
     67 {
     68 #endif
     69 #ifdef __cplusplus
     70 }
     71 #endif
     72 
     73 /* ifndef MUTEX_H */
     74 #endif
     75 /* end of mutex.h */