summaryrefslogtreecommitdiffstats
path: root/src/include/k5-thread.h
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@mit.edu>2006-01-25 06:39:36 +0000
committerKen Raeburn <raeburn@mit.edu>2006-01-25 06:39:36 +0000
commit724f3548131de9bb4c77f054262a854b2746c0e6 (patch)
tree3d7650bd44a196def8d41705756dc431249fafaf /src/include/k5-thread.h
parent33c1fbd68f77f0fa60283c0f42f1c820a8d1f11c (diff)
downloadkrb5-724f3548131de9bb4c77f054262a854b2746c0e6.tar.gz
krb5-724f3548131de9bb4c77f054262a854b2746c0e6.tar.xz
krb5-724f3548131de9bb4c77f054262a854b2746c0e6.zip
* k5-thread.h (krb5int_mutex_alloc, krb5int_mutex_free, krb5int_mutex_lock,
krb5int_mutex_unlock): Declare. (k5_mutex_lock, k5_mutex_unlock) [PLUGIN]: Redefine to call krb5int_ function versions. ticket: 3417 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17610 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/include/k5-thread.h')
-rw-r--r--src/include/k5-thread.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/include/k5-thread.h b/src/include/k5-thread.h
index 7dbcfac6b..bd7b3cdf2 100644
--- a/src/include/k5-thread.h
+++ b/src/include/k5-thread.h
@@ -774,4 +774,25 @@ extern void *k5_getspecific(k5_key_t);
extern int k5_setspecific(k5_key_t, void *);
extern int k5_key_delete(k5_key_t);
+extern int KRB5_CALLCONV krb5int_mutex_alloc (k5_mutex_t **);
+extern void KRB5_CALLCONV krb5int_mutex_free (k5_mutex_t *);
+extern int KRB5_CALLCONV krb5int_mutex_lock (k5_mutex_t *);
+extern int KRB5_CALLCONV krb5int_mutex_unlock (k5_mutex_t *);
+
+/* In time, many of the definitions above should move into the support
+ library, and this file should be greatly simplified. For type
+ definitions, that'll take some work, since other data structures
+ incorporate mutexes directly, and our mutex type is dependent on
+ configuration options and system attributes. For most functions,
+ though, it should be relatively easy.
+
+ For now, plugins should use the exported functions, and not the
+ above macros, and use krb5int_mutex_alloc for allocations. */
+#ifdef PLUGIN
+#undef k5_mutex_lock
+#define k5_mutex_lock krb5int_mutex_lock
+#undef k5_mutex_unlock
+#define k5_mutex_unlock krb5int_mutex_unlock
+#endif
+
#endif /* multiple inclusion? */