From: Ken Raeburn Date: Wed, 25 Jan 2006 06:39:36 +0000 (+0000) Subject: * k5-thread.h (krb5int_mutex_alloc, krb5int_mutex_free, krb5int_mutex_lock, X-Git-Tag: krb5-1.5-alpha1~206 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=724f3548131de9bb4c77f054262a854b2746c0e6;p=krb5.git * 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 --- diff --git a/src/include/ChangeLog b/src/include/ChangeLog index e5c7530e8..f630a4902 100644 --- a/src/include/ChangeLog +++ b/src/include/ChangeLog @@ -1,3 +1,10 @@ +2006-01-25 Ken Raeburn + + * 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. + 2005-12-16 Ken Raeburn * k5-thread.h (USE_PTHREAD_LOCK_ONLY_IF_LOADED): Define any time 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? */