make-des-test-buildable-20010430
[openafs.git] / src / des / stats.h
1 /* Copyright (C) 1990 Transarc Corporation - All rights reserved */
2
3 /* Some Cheap statistics which should be shared with the rxkad definitions, but
4  * aren't.  The layout should match the layout in rxkad/rxkad.p.h. */
5
6 struct {
7     afs_uint32 rxkad_stuff[34]; /* see rxkad.h */
8     afs_uint32 fc_stuff[3];             /* see rxkad.h */
9     afs_uint32 des_encrypts[2]; /* DECRYPT==0, ENCRYPT==1 */
10     afs_uint32 des_key_scheds;  /* key schedule creations */
11     afs_uint32 des_randoms;             /* random blocks generated */
12     unsigned long spares[10];
13 } rxkad_stats; /* put these here for convenience */
14
15 #ifdef AFS_PTHREAD_ENV
16 #include <pthread.h>
17 #include <assert.h>
18 extern pthread_mutex_t rxkad_stats_mutex;
19 #define LOCK_RXKAD_STATS assert(pthread_mutex_lock(&rxkad_stats_mutex)==0);
20 #define UNLOCK_RXKAD_STATS assert(pthread_mutex_unlock(&rxkad_stats_mutex)==0);
21 #else
22 #define LOCK_RXKAD_STATS
23 #define UNLOCK_RXKAD_STATS
24 #endif
25