reindent-20030715
[openafs.git] / src / des / stats.h
1 /* 
2  * Copyright 2000, International Business Machines Corporation and others.
3  * All Rights Reserved.
4  * 
5  * This software has been released under the terms of the IBM Public
6  * License.  For details, see the LICENSE file in the top-level source
7  * directory or online at http://www.openafs.org/dl/license10.html
8  */
9
10 /* Some Cheap statistics which should be shared with the rxkad definitions, but
11  * aren't.  The layout should match the layout in rxkad/rxkad.p.h. */
12
13 struct {
14     afs_uint32 rxkad_stuff[34]; /* see rxkad.h */
15     afs_uint32 fc_stuff[3];     /* see rxkad.h */
16     afs_uint32 des_encrypts[2]; /* DECRYPT==0, ENCRYPT==1 */
17     afs_uint32 des_key_scheds;  /* key schedule creations */
18     afs_uint32 des_randoms;     /* random blocks generated */
19     unsigned long spares[10];
20 } rxkad_stats;                  /* put these here for convenience */
21
22 #ifdef AFS_PTHREAD_ENV
23 #include <pthread.h>
24 #include <assert.h>
25 extern pthread_mutex_t rxkad_stats_mutex;
26 #define LOCK_RXKAD_STATS assert(pthread_mutex_lock(&rxkad_stats_mutex)==0);
27 #define UNLOCK_RXKAD_STATS assert(pthread_mutex_unlock(&rxkad_stats_mutex)==0);
28 #else
29 #define LOCK_RXKAD_STATS
30 #define UNLOCK_RXKAD_STATS
31 #endif