aboutsummaryrefslogtreecommitdiffstats
path: root/src/mutex/pthreads
diff options
context:
space:
mode:
Diffstat (limited to 'src/mutex/pthreads')
-rw-r--r--src/mutex/pthreads/info.txt29
-rw-r--r--src/mutex/pthreads/mux_pthr.cpp58
-rw-r--r--src/mutex/pthreads/mux_pthr.h26
3 files changed, 0 insertions, 113 deletions
diff --git a/src/mutex/pthreads/info.txt b/src/mutex/pthreads/info.txt
deleted file mode 100644
index 1d826b61c..000000000
--- a/src/mutex/pthreads/info.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-define MUTEX_PTHREAD
-
-<source>
-mux_pthr.cpp
-</source>
-
-<header:internal>
-mux_pthr.h
-</header:internal>
-
-<libs>
-all!qnx,freebsd,dragonfly,openbsd,netbsd -> pthread
-</libs>
-
-<os>
-aix
-cygwin
-darwin
-freebsd
-dragonfly
-hpux
-irix
-linux
-netbsd
-openbsd
-qnx
-solaris
-tru64
-</os>
diff --git a/src/mutex/pthreads/mux_pthr.cpp b/src/mutex/pthreads/mux_pthr.cpp
deleted file mode 100644
index 165132239..000000000
--- a/src/mutex/pthreads/mux_pthr.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
-* Pthread Mutex
-* (C) 1999-2007 Jack Lloyd
-*
-* Distributed under the terms of the Botan license
-*/
-
-#include <botan/internal/mux_pthr.h>
-#include <botan/exceptn.h>
-
-#ifndef _POSIX_C_SOURCE
- #define _POSIX_C_SOURCE 199506
-#endif
-
-#include <pthread.h>
-
-namespace Botan {
-
-/*
-* Pthread Mutex Factory
-*/
-Mutex* Pthread_Mutex_Factory::make()
- {
-
- class Pthread_Mutex : public Mutex
- {
- public:
- void lock()
- {
- if(pthread_mutex_lock(&mutex) != 0)
- throw Invalid_State("Pthread_Mutex::lock: Error occured");
- }
-
- void unlock()
- {
- if(pthread_mutex_unlock(&mutex) != 0)
- throw Invalid_State("Pthread_Mutex::unlock: Error occured");
- }
-
- Pthread_Mutex()
- {
- if(pthread_mutex_init(&mutex, 0) != 0)
- throw Invalid_State("Pthread_Mutex: initialization failed");
- }
-
- ~Pthread_Mutex()
- {
- if(pthread_mutex_destroy(&mutex) != 0)
- throw Invalid_State("~Pthread_Mutex: mutex is still locked");
- }
- private:
- pthread_mutex_t mutex;
- };
-
- return new Pthread_Mutex();
- }
-
-}
diff --git a/src/mutex/pthreads/mux_pthr.h b/src/mutex/pthreads/mux_pthr.h
deleted file mode 100644
index 5cecd09ad..000000000
--- a/src/mutex/pthreads/mux_pthr.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
-* Pthread Mutex
-* (C) 1999-2007 Jack Lloyd
-*
-* Distributed under the terms of the Botan license
-*/
-
-#ifndef BOTAN_MUTEX_PTHREAD_H__
-#define BOTAN_MUTEX_PTHREAD_H__
-
-#include <botan/internal/mutex.h>
-
-namespace Botan {
-
-/**
-* Pthread Mutex Factory
-*/
-class Pthread_Mutex_Factory : public Mutex_Factory
- {
- public:
- Mutex* make();
- };
-
-}
-
-#endif