]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
Moved mutex.c to a separate folder in order to cleanly wrap other threading primitive...
authorTobias Brunner <tobias@strongswan.org>
Mon, 7 Dec 2009 14:56:04 +0000 (15:56 +0100)
committerTobias Brunner <tobias@strongswan.org>
Wed, 23 Dec 2009 16:00:58 +0000 (17:00 +0100)
46 files changed:
src/charon/bus/bus.c
src/charon/config/backend_manager.c
src/charon/config/peer_cfg.c
src/charon/credentials/credential_manager.c
src/charon/credentials/sets/cert_cache.c
src/charon/network/sender.c
src/charon/plugins/eap_radius/radius_client.c
src/charon/plugins/eap_sim_file/eap_sim_file_triplets.c
src/charon/plugins/kernel_klips/kernel_klips_ipsec.c
src/charon/plugins/kernel_netlink/kernel_netlink_ipsec.c
src/charon/plugins/kernel_netlink/kernel_netlink_net.c
src/charon/plugins/kernel_netlink/kernel_netlink_shared.c
src/charon/plugins/kernel_pfkey/kernel_pfkey_ipsec.c
src/charon/plugins/kernel_pfroute/kernel_pfroute_net.c
src/charon/plugins/load_tester/load_tester_plugin.c
src/charon/plugins/nm/nm_creds.c
src/charon/plugins/resolve/resolve_handler.c
src/charon/plugins/stroke/stroke_attribute.c
src/charon/plugins/stroke/stroke_ca.c
src/charon/plugins/stroke/stroke_config.c
src/charon/plugins/stroke/stroke_cred.c
src/charon/plugins/stroke/stroke_socket.c
src/charon/plugins/unit_tester/tests/test_mutex.c
src/charon/processing/jobs/callback_job.c
src/charon/processing/processor.c
src/charon/processing/scheduler.c
src/charon/sa/authenticators/eap/eap_manager.c
src/charon/sa/connect_manager.c
src/charon/sa/ike_sa_manager.c
src/charon/sa/mediation_manager.c
src/charon/sa/trap_manager.c
src/libfast/dispatcher.c
src/libstrongswan/Makefile.am
src/libstrongswan/attributes/attribute_manager.c
src/libstrongswan/credentials/credential_factory.c
src/libstrongswan/credentials/keys/key_encoding.c
src/libstrongswan/crypto/crypto_factory.c
src/libstrongswan/database/database_factory.c
src/libstrongswan/fetcher/fetcher_manager.c
src/libstrongswan/library.h
src/libstrongswan/plugins/gcrypt/gcrypt_plugin.c
src/libstrongswan/plugins/mysql/mysql_database.c
src/libstrongswan/plugins/openssl/openssl_plugin.c
src/libstrongswan/plugins/sqlite/sqlite_database.c
src/libstrongswan/threading.h [moved from src/libstrongswan/utils/mutex.h with 96% similarity]
src/libstrongswan/threading/mutex.c [moved from src/libstrongswan/utils/mutex.c with 99% similarity]

index 1dd3aee9760546bf6b0ad73e777515fb38817dde..c2184234ba54f085e232a563cc2c739c8561c88d 100644 (file)
@@ -19,7 +19,7 @@
 #include <stdint.h>
 
 #include <daemon.h>
-#include <utils/mutex.h>
+#include <threading.h>
 
 ENUM(debug_names, DBG_DMN, DBG_LIB,
        "DMN",
index 0665d8e2f8f5cfb07ea631cd83d7ffdc9a748d99..dabae342cee266c713042a72e0b73fde5735848d 100644 (file)
@@ -20,7 +20,7 @@
 
 #include <daemon.h>
 #include <utils/linked_list.h>
-#include <utils/mutex.h>
+#include <threading.h>
 
 
 typedef struct private_backend_manager_t private_backend_manager_t;
index df946b73a0acb22107d5823e92467e7a2022e89c..cf5d00621da59b613177e1092384df03e13d6d95 100644 (file)
@@ -21,7 +21,7 @@
 
 #include <daemon.h>
 
-#include <utils/mutex.h>
+#include <threading.h>
 #include <utils/linked_list.h>
 #include <utils/identification.h>
 
index 1d20a1e1eba6d7878ad7fb78c7f60f399e6ed4ec..36d634c03671bdc34ca452b556c93d72837f56ae 100644 (file)
@@ -18,7 +18,7 @@
 #include "credential_manager.h"
 
 #include <daemon.h>
-#include <utils/mutex.h>
+#include <threading.h>
 #include <utils/linked_list.h>
 #include <credentials/sets/cert_cache.h>
 #include <credentials/sets/auth_cfg_wrapper.h>
index de8994b8286aee964b9bca5acf94974c07da9de9..037f102fd7755b2bf14152f67d7464df567373dc 100644 (file)
@@ -19,7 +19,7 @@
 #include <sched.h>
 
 #include <daemon.h>
-#include <utils/mutex.h>
+#include <threading.h>
 #include <utils/linked_list.h>
 
 /** cache size, a power of 2 for fast modulo */
index 402773f8906aa9dfea605c03f777a3cee812bbe6..dc7b0624e608937198c4f84c57ff75eee1092e07 100644 (file)
@@ -22,7 +22,7 @@
 #include <daemon.h>
 #include <network/socket.h>
 #include <processing/jobs/callback_job.h>
-#include <utils/mutex.h>
+#include <threading.h>
 
 
 typedef struct private_sender_t private_sender_t;
index 63c3b849f0d36f787a3ea37dca8abaf807f27c60..5d4779c65124e4a9b09fe935e85ef3fa4bbe5e34 100644 (file)
@@ -21,7 +21,7 @@
 #include <daemon.h>
 #include <utils/host.h>
 #include <utils/linked_list.h>
-#include <utils/mutex.h>
+#include <threading.h>
 
 /**
  * Default RADIUS server port, when not configured
index 12d3a6fe2b810c1f6ccabf04e1f42d1b35ebd744..cda0c0ff4b2a98dabb725accd1adafe7c9f783c5 100644 (file)
@@ -20,7 +20,7 @@
 
 #include <daemon.h>
 #include <utils/linked_list.h>
-#include <utils/mutex.h>
+#include <threading.h>
 
 typedef struct private_eap_sim_file_triplets_t private_eap_sim_file_triplets_t;
 
index e0e4a7670f2a9976100b3d8fa8e09d77fe038ff6..dfa79f4d7aef9fe2f5e9e41e5684b3a84c3fd8b7 100644 (file)
@@ -30,7 +30,7 @@
 #include "kernel_klips_ipsec.h"
 
 #include <daemon.h>
-#include <utils/mutex.h>
+#include <threading.h>
 #include <processing/jobs/callback_job.h>
 #include <processing/jobs/acquire_job.h>
 #include <processing/jobs/rekey_child_sa_job.h>
index 9cebd4627d800f63b1e73a84f7a662e765dfd8a1..691bab791890a276adb7518bff1f358bdab73738 100644 (file)
@@ -36,7 +36,7 @@
 #include "kernel_netlink_shared.h"
 
 #include <daemon.h>
-#include <utils/mutex.h>
+#include <threading.h>
 #include <utils/hashtable.h>
 #include <processing/jobs/callback_job.h>
 #include <processing/jobs/acquire_job.h>
index 609a5c3b6723570c2fccae74ff469f6963edb275..67e7c820f41126dc44065fb0f81ad65de8a45812 100644 (file)
@@ -26,7 +26,7 @@
 #include "kernel_netlink_shared.h"
 
 #include <daemon.h>
-#include <utils/mutex.h>
+#include <threading.h>
 #include <utils/linked_list.h>
 #include <processing/jobs/callback_job.h>
 #include <processing/jobs/roam_job.h>
index 3d8ca880701893a4733ebb6078d28d7588eec72f..e4bdbb1c5271c7786dbc4eb820cd77d5f34b3cef 100644 (file)
@@ -22,7 +22,7 @@
 #include "kernel_netlink_shared.h"
 
 #include <daemon.h>
-#include <utils/mutex.h>
+#include <threading.h>
 
 typedef struct private_netlink_socket_t private_netlink_socket_t;
 
index b26a2bc0a949c83ffe22a21ae907442fb6d1ab7b..98f7a57927f2b2e6601ec95a4949ebad91bc0334 100644 (file)
@@ -56,7 +56,7 @@
 
 #include <daemon.h>
 #include <utils/host.h>
-#include <utils/mutex.h>
+#include <threading.h>
 #include <processing/jobs/callback_job.h>
 #include <processing/jobs/acquire_job.h>
 #include <processing/jobs/migrate_job.h>
index 768810411032e3cc50a75b6e66a66504fe740157..814fbad832b45420a46d6c203e97f73446ec06b3 100644 (file)
@@ -26,7 +26,7 @@
 
 #include <daemon.h>
 #include <utils/host.h>
-#include <utils/mutex.h>
+#include <threading.h>
 #include <utils/linked_list.h>
 #include <processing/jobs/callback_job.h>
 #include <processing/jobs/roam_job.h>
index 63c39b7ee9846ff6af82a8aa8eca944e1215ca4c..de721e05d806f98f612e8ec0ec30d03151093535 100644 (file)
@@ -24,7 +24,7 @@
 
 #include <daemon.h>
 #include <processing/jobs/callback_job.h>
-#include <utils/mutex.h>
+#include <threading.h>
 
 typedef struct private_load_tester_plugin_t private_load_tester_plugin_t;
 
index 4f90fd6733010922e7c5262417d3b4883505418a..68ef61fce549f14f801c13353fef5f7985bf1bc1 100644 (file)
@@ -20,7 +20,7 @@
 #include <unistd.h>
 
 #include <daemon.h>
-#include <utils/mutex.h>
+#include <threading.h>
 #include <credentials/certificates/x509.h>
 
 typedef struct private_nm_creds_t private_nm_creds_t;
index 1d18335bed8ebc9f9d69b9525a76ddbbf8f72292..7f7e0247413ecca8b63e731d024682dcfd5d405a 100644 (file)
@@ -18,7 +18,7 @@
 #include <unistd.h>
 
 #include <daemon.h>
-#include <utils/mutex.h>
+#include <threading.h>
 
 typedef struct private_resolve_handler_t private_resolve_handler_t;
 
index db8b53e961cd7f828821e2224f442fed6b64c5b3..d013528231397f9ab104f06e198585e110852554 100644 (file)
@@ -18,7 +18,7 @@
 #include <daemon.h>
 #include <utils/linked_list.h>
 #include <utils/hashtable.h>
-#include <utils/mutex.h>
+#include <threading.h>
 
 #define POOL_LIMIT (sizeof(uintptr_t)*8)
 
index 152ef748f13dd26047b01f0c5c013a96add44584..ebcd9ac3be95a034efd8386c6aba8ca2b23269a2 100644 (file)
@@ -17,7 +17,7 @@
 #include "stroke_ca.h"
 #include "stroke_cred.h"
 
-#include <utils/mutex.h>
+#include <threading.h>
 #include <utils/linked_list.h>
 #include <crypto/hashers/hasher.h>
 
index 08dafd2060ff1bf98b49f6f6f3c0850115ed2f71..c03349ac962a57fd1752fcea26a5c649aec1a917 100644 (file)
@@ -16,7 +16,7 @@
 #include "stroke_config.h"
 
 #include <daemon.h>
-#include <utils/mutex.h>
+#include <threading.h>
 #include <utils/lexparser.h>
 
 typedef struct private_stroke_config_t private_stroke_config_t;
index 627418bd36cd64921329af384ecf819043dd2c33..91830985a92e44cf2066539ddfd11725243bee5d 100644 (file)
@@ -27,7 +27,7 @@
 #include <credentials/certificates/ac.h>
 #include <utils/linked_list.h>
 #include <utils/lexparser.h>
-#include <utils/mutex.h>
+#include <threading.h>
 #include <daemon.h>
 
 /* configuration directories and files */
index 2faa2353ba639665ab37fb12777248e8b57ffd49..f834f8e158519d491ee1fac94091a98c03eee129 100644 (file)
@@ -27,7 +27,7 @@
 
 #include <processing/jobs/callback_job.h>
 #include <daemon.h>
-#include <utils/mutex.h> /* for Mac OS X compatible accept */
+#include <threading.h> /* for Mac OS X compatible accept */
 
 #include "stroke_config.h"
 #include "stroke_control.h"
index cfe00cc7cda1745661f7a0669bb84fc4ef1c4d47..900b652157c39aa202c6b25b6c4ae21d5c4fa61a 100644 (file)
@@ -14,7 +14,7 @@
  */
 
 #include <library.h>
-#include <utils/mutex.h>
+#include <threading.h>
 
 #include <unistd.h>
 #include <sched.h>
index ad51dc55dd3ec06faa0cf10de0926039ce2cb7a0..e4299af6b67e0cf6d0ebf8323fe3e317eccb9fa2 100644 (file)
@@ -18,7 +18,7 @@
 #include <pthread.h>
 
 #include <daemon.h>
-#include <utils/mutex.h>
+#include <threading.h>
 
 typedef struct private_callback_job_t private_callback_job_t;
 
index a364017c2bb80de179908637649b7748ebd286d3..248bba1453619739e59f7d842ea0fb627cb63944 100644 (file)
@@ -22,7 +22,7 @@
 #include "processor.h"
 
 #include <daemon.h>
-#include <utils/mutex.h>
+#include <threading.h>
 #include <utils/linked_list.h>
 
 
index d09b384c39c4f86a248d7683e7814719dbe608b6..36ccb14683acce30d35aa4e7f6b3ac7b854ceb7c 100644 (file)
@@ -23,7 +23,7 @@
 #include <daemon.h>
 #include <processing/processor.h>
 #include <processing/jobs/callback_job.h>
-#include <utils/mutex.h>
+#include <threading.h>
 
 /* the initial size of the heap */
 #define HEAP_SIZE_DEFAULT 64
index eb4cb0c2d1e15011c26f33c593f5deedb4b53d4c..3738cb948551426f431593b28add6ef258817017 100644 (file)
@@ -16,7 +16,7 @@
 #include "eap_manager.h"
 
 #include <utils/linked_list.h>
-#include <utils/mutex.h>
+#include <threading.h>
 
 typedef struct private_eap_manager_t private_eap_manager_t;
 typedef struct eap_entry_t eap_entry_t;
index fe95c037018e2d1ac6bcea2e43a88638301df04d..e26c6c60c7e9965a68c9bccfd0df2cfaba783e5d 100644 (file)
@@ -18,7 +18,7 @@
 #include <math.h>
 
 #include <daemon.h>
-#include <utils/mutex.h>
+#include <threading.h>
 #include <utils/linked_list.h>
 #include <crypto/hashers/hasher.h>
 
index 0ad39f3e553abe42235ebe345494eb426dab465b..bb8a4e0ab9b8d15804494fccf5b0d84535f7ccef 100644 (file)
@@ -22,7 +22,7 @@
 #include <daemon.h>
 #include <sa/ike_sa_id.h>
 #include <bus/bus.h>
-#include <utils/mutex.h>
+#include <threading.h>
 #include <utils/linked_list.h>
 #include <crypto/hashers/hasher.h>
 
index 2b05df1f4c72c50c8020aac3c940a15c8a60d0c1..5161a71477bb3686c61a2757b9979baa5efb54e5 100644 (file)
@@ -16,7 +16,7 @@
 #include "mediation_manager.h"
 
 #include <daemon.h>
-#include <utils/mutex.h>
+#include <threading.h>
 #include <utils/linked_list.h>
 #include <processing/jobs/mediation_job.h>
 
index ec68e94d05b418de726a6878191777e01878ba9d..edcba3a8b9940475ec88ade60ad8178aa8ced0e6 100644 (file)
@@ -16,7 +16,7 @@
 #include "trap_manager.h"
 
 #include <daemon.h>
-#include <utils/mutex.h>
+#include <threading.h>
 #include <utils/linked_list.h>
 
 
index 04fa33961e34b50d3a9f28d65570d1adc406c8f6..a4d23bf7b6207ff371d295fa2f0d44ee2d094b04 100644 (file)
@@ -24,7 +24,7 @@
 #include <unistd.h>
 
 #include <debug.h>
-#include <utils/mutex.h>
+#include <threading.h>
 #include <utils/linked_list.h>
 #include <utils/hashtable.h>
 
index 2ed9f7dc7c019936223d95ae682b0f63837e7c71..bf5a1123c12205493cd989e40b10f7442ee63f2b 100644 (file)
@@ -43,6 +43,7 @@ credentials/ietf_attributes/ietf_attributes.c credentials/ietf_attributes/ietf_a
 database/database.h database/database_factory.h database/database_factory.c \
 fetcher/fetcher.h fetcher/fetcher_manager.h fetcher/fetcher_manager.c \
 selectors/traffic_selector.c selectors/traffic_selector.h \
+threading.h threading/mutex.c \
 utils.h utils.c \
 utils/host.c utils/host.h \
 utils/identification.c utils/identification.h \
@@ -52,7 +53,6 @@ utils/linked_list.c utils/linked_list.h \
 utils/hashtable.c utils/hashtable.h \
 utils/enumerator.c utils/enumerator.h \
 utils/optionsfrom.c utils/optionsfrom.h \
-utils/mutex.c utils/mutex.h \
 utils/backtrace.c utils/backtrace.h \
 plugins/plugin_loader.c plugins/plugin_loader.h plugins/plugin.h
 
index 66f1d27e84777c761bee3b06ec54baa8bec6e741..4b0c5092145343d138974fb8bab712b55941a18e 100644 (file)
@@ -17,7 +17,7 @@
 
 #include <debug.h>
 #include <utils/linked_list.h>
-#include <utils/mutex.h>
+#include <threading.h>
 
 typedef struct private_attribute_manager_t private_attribute_manager_t;
 
index 0de0946ed2e8c9cef9a4fb268223780e393c2a16..7e94b9d14baf7d83e58bde1d7c4482c76df22282 100644 (file)
@@ -20,7 +20,7 @@
 
 #include <debug.h>
 #include <utils/linked_list.h>
-#include <utils/mutex.h>
+#include <threading.h>
 #include <credentials/certificates/x509.h>
 
 ENUM(credential_type_names, CRED_PRIVATE_KEY, CRED_CERTIFICATE,
index 7c09b9f9502648a46acfd483be5eeaa4e058fc2e..b9bd89f606461edbb352c405e8c1fa086c3b14e2 100644 (file)
@@ -19,7 +19,7 @@
 
 #include <utils/linked_list.h>
 #include <utils/hashtable.h>
-#include <utils/mutex.h>
+#include <threading.h>
 
 typedef struct private_key_encoding_t private_key_encoding_t;
 
index 9bc986f684c84c2437c386560c1e09c1f3e28774..2181086466babd6dd4abdf7f3e65f62c2b21d865 100644 (file)
@@ -16,7 +16,7 @@
 #include "crypto_factory.h"
 
 #include <debug.h>
-#include <utils/mutex.h>
+#include <threading.h>
 #include <utils/linked_list.h>
 #include <crypto/crypto_tester.h>
 
index c0c666138db20bc2c2366d58f44d48ef4c8a1875..a0f50c80c1405e4de920059f4920e86265e47e86 100644 (file)
@@ -16,7 +16,7 @@
 #include "database_factory.h"
 
 #include <utils/linked_list.h>
-#include <utils/mutex.h>
+#include <threading.h>
 
 typedef struct private_database_factory_t private_database_factory_t;
 
index 7a31f17c36ae3922b6c4a06716a0581ea0de6b42..fd3b0eef9ac018e5958628de02c6c62c6d2ae418 100644 (file)
@@ -16,7 +16,7 @@
 #include "fetcher_manager.h"
 
 #include <debug.h>
-#include <utils/mutex.h>
+#include <threading.h>
 #include <utils/linked_list.h>
 
 typedef struct private_fetcher_manager_t private_fetcher_manager_t;
index 2673afa4bb7ad642025b3af83a810612324de350..78a6fe0a9a3593940554cd903ed57dd564c7227c 100644 (file)
@@ -40,6 +40,9 @@
  * @defgroup plugins plugins
  * @ingroup libstrongswan
  *
+ * @defgroup threading threading
+ * @ingroup libstrongswan
+ *
  * @defgroup utils utils
  * @ingroup libstrongswan
  */
index 083cab5369eab9b1b4102f266790f34a48e3afea..66481da3892d843e634dedfd464a208c6c5944f3 100644 (file)
@@ -24,7 +24,7 @@
 
 #include <library.h>
 #include <debug.h>
-#include <utils/mutex.h>
+#include <threading.h>
 
 #include <errno.h>
 #include <gcrypt.h>
index 9775a8685f29d9d3a1ec0172da569991143d5710..f01321fb55c2ed1b2d40915368e4a85e6d2579e6 100644 (file)
@@ -21,7 +21,7 @@
 #include "mysql_database.h"
 
 #include <debug.h>
-#include <utils/mutex.h>
+#include <threading.h>
 #include <utils/linked_list.h>
 
 /* Older mysql.h headers do not define it, but we need it. It is not returned
index 7d941348f519b1c93632221c9ada9cb269e918dd..0cb526d8917d31c3042f1cf2c5e0a04c0c32d2b9 100644 (file)
@@ -23,7 +23,7 @@
 #include "openssl_plugin.h"
 
 #include <library.h>
-#include <utils/mutex.h>
+#include <threading.h>
 #include "openssl_util.h"
 #include "openssl_crypter.h"
 #include "openssl_hasher.h"
index 4e18de1c2418ed22ce3673c0b93d3db0c9110851..afe67f62a662e989fce5db794d47340aefe2740e 100644 (file)
@@ -19,7 +19,7 @@
 #include <unistd.h>
 #include <library.h>
 #include <debug.h>
-#include <utils/mutex.h>
+#include <threading.h>
 
 typedef struct private_sqlite_database_t private_sqlite_database_t;
 
similarity index 96%
rename from src/libstrongswan/utils/mutex.h
rename to src/libstrongswan/threading.h
index 8e53c82ca029a3d9cfd646fec64d421a8e9704a9..8b9f37faba801ba1912e961969b226b59c38f5b5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2008 Tobias Brunner
+ * Copyright (C) 2008-2009 Tobias Brunner
  * Copyright (C) 2008 Martin Willi
  * Hochschule fuer Technik Rapperswil
  *
  */
 
 /**
- * @defgroup mutex mutex
- * @{ @ingroup utils
+ * @defgroup threading threading
+ * @{ @ingroup libstrongswan
  */
 
-#ifndef MUTEX_H_
-#define MUTEX_H_
+#ifndef THREADING_H_
+#define THREADING_H_
 
 typedef struct mutex_t mutex_t;
 typedef struct condvar_t condvar_t;
@@ -213,4 +213,4 @@ condvar_t *condvar_create(condvar_type_t type);
  */
 rwlock_t *rwlock_create(rwlock_type_t type);
 
-#endif /** MUTEX_H_ @}*/
+#endif /** THREADING_H_ @}*/
similarity index 99%
rename from src/libstrongswan/utils/mutex.c
rename to src/libstrongswan/threading/mutex.c
index 3e1885a424639f7dc3802d6ef12c17faec685845..33634023397d19e05c51a01ddab46ae547d5f4af 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2008 Tobias Brunner
+ * Copyright (C) 2008-2009 Tobias Brunner
  * Copyright (C) 2008 Martin Willi
  * Hochschule fuer Technik Rapperswil
  *
@@ -20,8 +20,7 @@
 #include <time.h>
 #include <errno.h>
 
-#include "mutex.h"
-
+#include <threading.h>
 #include <library.h>
 #include <debug.h>