diff options
| author | Ken Raeburn <raeburn@mit.edu> | 2005-01-09 06:03:56 +0000 |
|---|---|---|
| committer | Ken Raeburn <raeburn@mit.edu> | 2005-01-09 06:03:56 +0000 |
| commit | c7dfc728c92321e8f76df249f5708e92cf4c0d08 (patch) | |
| tree | 2311e66473e13b94fd38ac694a19959de1c89b67 /src/include | |
| parent | e0039672b170004eccb8712403bae3810150c8ff (diff) | |
| download | krb5-c7dfc728c92321e8f76df249f5708e92cf4c0d08.tar.gz krb5-c7dfc728c92321e8f76df249f5708e92cf4c0d08.tar.xz krb5-c7dfc728c92321e8f76df249f5708e92cf4c0d08.zip | |
* k5-thread.h (KRB5_CALLCONV, KRB5_CALLCONV_C): Define if not defined.
(krb5int_mutx_lock_update_stats, krb5int_mutex_unlock_update_stats,
krb5int_mutex_report_stats) [!DEBUG_THREADS_STATS]: Declare, with KRB5_CALLCONV.
(k5_debug_make_loc): Change "lineno" to type int.
(k5_debug_make_loc): Likewise for argument "line".
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17012 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/ChangeLog | 10 | ||||
| -rw-r--r-- | src/include/k5-thread.h | 18 |
2 files changed, 26 insertions, 2 deletions
diff --git a/src/include/ChangeLog b/src/include/ChangeLog index 2df928059..21ac13728 100644 --- a/src/include/ChangeLog +++ b/src/include/ChangeLog @@ -1,3 +1,13 @@ +2005-01-07 Ken Raeburn <raeburn@mit.edu> + + * k5-thread.h (KRB5_CALLCONV, KRB5_CALLCONV_C): Define if not + defined. + (krb5int_mutx_lock_update_stats, + krb5int_mutex_unlock_update_stats, krb5int_mutex_report_stats) + [!DEBUG_THREADS_STATS]: Declare, with KRB5_CALLCONV. + (k5_debug_make_loc): Change "lineno" to type int. + (k5_debug_make_loc): Likewise for argument "line". + 2005-01-04 Jeffrey Altman <jaltman@mit.edu> * krb5.hin: add prototype for krb5_is_thread_safe diff --git a/src/include/k5-thread.h b/src/include/k5-thread.h index 88b6bf3b9..2d8c03413 100644 --- a/src/include/k5-thread.h +++ b/src/include/k5-thread.h @@ -31,6 +31,12 @@ #define K5_THREAD_H #include "autoconf.h" +#ifndef KRB5_CALLCONV +# define KRB5_CALLCONV +#endif +#ifndef KRB5_CALLCONV_C +# define KRB5_CALLCONV_C +#endif /* Interface (tentative): @@ -148,13 +154,13 @@ #ifdef DEBUG_THREADS_LOC typedef struct { const char *filename; - short lineno; + int lineno; } k5_debug_loc; #define K5_DEBUG_LOC_INIT { __FILE__, __LINE__ } #if __GNUC__ >= 2 #define K5_DEBUG_LOC (__extension__ (k5_debug_loc)K5_DEBUG_LOC_INIT) #else -static inline k5_debug_loc k5_debug_make_loc(const char *file, short line) +static inline k5_debug_loc k5_debug_make_loc(const char *file, int line) { k5_debug_loc l; l.filename = file; @@ -243,6 +249,14 @@ typedef int k5_mutex_stats_tmp; #define k5_mutex_stats_start() (0) #define k5_mutex_lock_update_stats(M,S) (S) #define k5_mutex_unlock_update_stats(M) (*(M) = 's') + +/* If statistics tracking isn't enabled, these functions don't actually + do anything. Declare anyways so we can do type checking etc. */ +void KRB5_CALLCONV krb5int_mutex_lock_update_stats(k5_debug_mutex_stats *m, + k5_mutex_stats_tmp start); +void KRB5_CALLCONV krb5int_mutex_unlock_update_stats(k5_debug_mutex_stats *m); +void KRB5_CALLCONV krb5int_mutex_report_stats(/* k5_mutex_t *m */); + #define krb5int_mutex_report_stats(M) ((M)->stats = 'd') #endif |
