aboutsummaryrefslogtreecommitdiff
path: root/src/mint/taler-mint-httpd_keystate.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mint/taler-mint-httpd_keystate.h')
-rw-r--r--src/mint/taler-mint-httpd_keystate.h25
1 files changed, 23 insertions, 2 deletions
diff --git a/src/mint/taler-mint-httpd_keystate.h b/src/mint/taler-mint-httpd_keystate.h
index 9529de8f3..0e20ef588 100644
--- a/src/mint/taler-mint-httpd_keystate.h
+++ b/src/mint/taler-mint-httpd_keystate.h
@@ -41,19 +41,40 @@ struct TMH_KS_StateHandle;
* For every call to #TMH_KS_acquire(), a matching call
* to #TMH_KS_release() must be made.
*
+ * @param location name of the function in which the lock is acquired
* @return the key state
*/
struct TMH_KS_StateHandle *
-TMH_KS_acquire (void);
+TMH_KS_acquire_ (const char *location);
/**
* Release key state, free if necessary (if reference count gets to zero).
*
+ * @param location name of the function in which the lock is acquired
* @param key_state the key state to release
*/
void
-TMH_KS_release (struct TMH_KS_StateHandle *key_state);
+TMH_KS_release_ (const char *location,
+ struct TMH_KS_StateHandle *key_state);
+
+
+/**
+ * Acquire the key state of the mint. Updates keys if necessary.
+ * For every call to #TMH_KS_acquire(), a matching call
+ * to #TMH_KS_release() must be made.
+ *
+ * @return the key state
+ */
+#define TMH_KS_acquire(void) TMH_KS_acquire_(__FUNCTION__)
+
+
+/**
+ * Release key state, free if necessary (if reference count gets to zero).
+ *
+ * @param key_state the key state to release
+ */
+#define TMH_KS_release(key_state) TMH_KS_release_ (__FUNCTION__, key_state)
/**