# define HEADER_ENGINE_INT_H
# include "internal/cryptlib.h"
+# include "internal/threads.h"
# include <internal/engine.h>
#ifdef __cplusplus
extern "C" {
#endif
+extern CRYPTO_RWLOCK *global_engine_lock;
+
/*
* If we compile with this symbol defined, then both reference counts in the
* ENGINE structure will be monitored with a line of output on stderr for
/*
* Any code that will need cleanup operations should use these functions to
* register callbacks. ENGINE_cleanup() will call all registered callbacks in
- * order. NB: both the "add" functions assume CRYPTO_LOCK_ENGINE to already be
+ * order. NB: both the "add" functions assume the engine lock to already be
* held (in "write" mode).
*/
typedef void (ENGINE_CLEANUP_CB) (void);
/*
* Internal versions of API functions that have control over locking. These
* are used between C files when functionality needs to be shared but the
- * caller may already be controlling of the CRYPTO_LOCK_ENGINE lock.
+ * caller may already be controlling of the engine lock.
*/
int engine_unlocked_init(ENGINE *e);
int engine_unlocked_finish(ENGINE *e, int unlock_for_handlers);
void engine_pkey_meths_free(ENGINE *e);
void engine_pkey_asn1_meths_free(ENGINE *e);
+/* Once initialisation function */
+extern CRYPTO_ONCE engine_lock_init;
+void do_engine_lock_init(void);
+
/*
* This is a structure for storing implementations of various crypto
* algorithms and functions.