OSX lock initialization cleanup
[openafs.git] / src / rx / DARWIN / rx_kmutex.c
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 /*
11  * rx_kmutex.c - mutex and condition variable macros for kernel environment.
12  *
13  * MACOS implementation.
14  */
15
16 #include <afsconfig.h>
17 #include "afs/param.h"
18
19
20 #ifndef AFS_DARWIN80_ENV
21 /*
22  * Currently everything is implemented in rx_kmutex.h
23  */
24 #else
25 #include <afs/sysincludes.h>    /* Standard vendor system headers */
26 #include <afsincludes.h>        /* Afs-based standard headers */
27 #include <afs/afs_stats.h>      /* statistics */
28 #include <sys/malloc.h>
29 #include <sys/namei.h>
30 #include <sys/ubc.h>
31 #if defined(AFS_DARWIN70_ENV)
32 #include <vfs/vfs_support.h>
33 #endif /* defined(AFS_DARWIN70_ENV) */
34
35 lck_grp_t * openafs_lck_grp;
36 static lck_grp_attr_t * openafs_lck_grp_attr;
37 void rx_kmutex_setup(void) {
38     openafs_lck_grp_attr= lck_grp_attr_alloc_init();
39     lck_grp_attr_setstat(openafs_lck_grp_attr);
40     
41     openafs_lck_grp = lck_grp_alloc_init("openafs",  openafs_lck_grp_attr);
42     lck_grp_attr_free(openafs_lck_grp_attr);
43     
44 }
45  
46 void rx_kmutex_finish(void) {
47     lck_grp_free(openafs_lck_grp);
48 }
49
50 #endif