Moved mutex.c to a separate folder in order to cleanly wrap other threading primitives (and utils/mutex.h is now threading.h).

This commit is contained in:
Tobias Brunner 2009-12-07 15:56:04 +01:00
parent 32d8f44229
commit 14f7091280
46 changed files with 54 additions and 52 deletions

View 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",

View 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;

View File

@ -21,7 +21,7 @@
#include <daemon.h>
#include <utils/mutex.h>
#include <threading.h>
#include <utils/linked_list.h>
#include <utils/identification.h>

View 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>

View 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 */

View 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;

View 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

View 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;

View 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>

View 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>

View 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>

View 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;

View 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>

View 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>

View 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;

View 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;

View 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;

View 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)

View 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>

View 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;

View 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 */

View 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"

View File

@ -14,7 +14,7 @@
*/
#include <library.h>
#include <utils/mutex.h>
#include <threading.h>
#include <unistd.h>
#include <sched.h>

View 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;

View File

@ -22,7 +22,7 @@
#include "processor.h"
#include <daemon.h>
#include <utils/mutex.h>
#include <threading.h>
#include <utils/linked_list.h>

View 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

View 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;

View 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>

View 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>

View 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>

View File

@ -16,7 +16,7 @@
#include "trap_manager.h"
#include <daemon.h>
#include <utils/mutex.h>
#include <threading.h>
#include <utils/linked_list.h>

View 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>

View 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

View 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;

View 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,

View 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;

View 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>

View 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;

View 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;

View File

@ -40,6 +40,9 @@
* @defgroup plugins plugins
* @ingroup libstrongswan
*
* @defgroup threading threading
* @ingroup libstrongswan
*
* @defgroup utils utils
* @ingroup libstrongswan
*/

View File

@ -24,7 +24,7 @@
#include <library.h>
#include <debug.h>
#include <utils/mutex.h>
#include <threading.h>
#include <errno.h>
#include <gcrypt.h>

View 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

View 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"

View 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;

View 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
*
@ -15,12 +15,12 @@
*/
/**
* @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_ @}*/

View 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>