aboutsummaryrefslogtreecommitdiff
path: root/src/mint/taler-mint-httpd_keystate.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-09-22 10:29:53 +0200
committerChristian Grothoff <christian@grothoff.org>2015-09-22 10:29:53 +0200
commitb022232a59f6b2acd1d183625089dba2b1ee5834 (patch)
tree3f8e5ea0d531f80dccd5b0670468f26e01defc3f /src/mint/taler-mint-httpd_keystate.h
parent8aebcf283a4aecb1d058db8b4f021439e45d3685 (diff)
-fix leak
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)
/**