From 8dcad019dbec2099c7a9ca92b495b8f6f62fa441 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Fri, 13 Apr 2007 09:19:04 +0000 Subject: [PATCH] Add a few comments on k5_mutex_t handling git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19460 dc483132-0cff-0310-8789-dd5450dbe970 --- src/include/k5-thread.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/include/k5-thread.h b/src/include/k5-thread.h index 73036c664..21c0688c6 100644 --- a/src/include/k5-thread.h +++ b/src/include/k5-thread.h @@ -1,7 +1,7 @@ /* * include/k5-thread.h * - * Copyright 2004,2005,2006 by the Massachusetts Institute of Technology. + * Copyright 2004,2005,2006,2007 by the Massachusetts Institute of Technology. * All Rights Reserved. * * Export of this software from the United States of America may @@ -271,6 +271,23 @@ void KRB5_CALLCONV krb5int_mutex_report_stats(/* k5_mutex_t *m */); +/* The mutex structure we use, k5_mutex_t, has some OS-specific bits, + and some non-OS-specific bits for debugging and profiling. + + The OS specific bits, in k5_os_mutex, break down into three primary + implementations, POSIX threads, Windows threads, and no thread + support. However, the POSIX thread version is further subdivided: + In one case, we can determine at run time whether the thread + library is linked into the application, and use it only if it is + present; in the other case, we cannot, and the thread library must + be linked in always, but can be used unconditionally. In the + former case, the k5_os_mutex structure needs to hold both the POSIX + and the non-threaded versions. + + The various k5_os_mutex_* operations are the OS-specific versions, + applied to the OS-specific data, and k5_mutex_* uses k5_os_mutex_* + to do the OS-specific parts of the work. */ + /* Define the OS mutex bit. */ /* First, if we're not actually doing multiple threads, do we -- 2.26.2