/[libspopc]/mutex.h
ViewVC logotype

Diff of /mutex.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2 by ben, Thu Oct 8 15:37:49 2009 UTC revision 25 by ben, Wed Apr 11 14:06:48 2012 UTC
# Line 4  Line 4 
4   *   *
5   * libspopc offers simple API for a pop3 client.   * libspopc offers simple API for a pop3 client.
6   * See RFC 1725 for pop3 specifications.   * See RFC 1725 for pop3 specifications.
  * more information on http://herewe.servebeer.com/libspopc/  
7   *   *
8   *  This library is free software; you can redistribute it and/or   *  This library is free software; you can redistribute it and/or
9   *  modify it under the terms of the GNU Lesser General Public   *  modify it under the terms of the GNU Lesser General Public
# Line 24  Line 23 
23  #ifndef MUTEX_H  #ifndef MUTEX_H
24  #define MUTEX_H  #define MUTEX_H
25    
26  #include <semaphore.h>  #ifdef USE_SEM /* no posix thread mutex */
27     #include <semaphore.h>
28  typedef sem_t mutex;   typedef sem_t mutex; /* use unix rt semaphores from librt */
29    #else
30     #ifdef USE_PMUTEX
31      #include <pthread.h>
32      typedef pthread_mutex_t mutex; /* use posix thread mutexes */
33     #else
34      typedef int mutex;
35     #endif
36    #endif
37    
38  /* initializes a thread-wide mutex */  /* initializes a thread-wide mutex */
39  int mutex_init(mutex* id);  int mutex_init(mutex* id);

Legend:
Removed from v.2  
changed lines
  Added in v.25

  ViewVC Help
Powered by ViewVC 1.1.26