8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / cmd / sgs / link_audit / common / bindings.h
blobb8e7f01ee9459beee220619969323f95c80018b9
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
19 * CDDL HEADER END
22 * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
25 #ifndef _BINDINGS_H
26 #define _BINDINGS_H
28 #include <sys/lwp.h>
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
34 #define BINDVERS 2
35 #define BINDCURVERS BINDVERS
37 #define DEFFILE "/tmp/bindings.data"
38 #define FILEENV "BT_BUFFER"
39 #define BLKSIZE 0x4000
40 #define STRBLKSIZE 0x1000
41 #define DEFBKTS 3571 /* nice big prime number */
43 #define MASK (~(unsigned long)0<<28)
45 typedef struct _bind_entry {
46 unsigned int be_sym_name;
47 unsigned int be_lib_name;
48 unsigned int be_count;
49 unsigned int be_next;
50 } binding_entry;
52 typedef struct {
53 unsigned int bb_head; /* first entry in bucket */
54 unsigned int bb_pad; /* maintain alignment for 32/64bit */
55 lwp_mutex_t bb_lock; /* bucket chain lock */
56 } binding_bucket;
58 typedef struct {
59 unsigned int bh_vers;
60 unsigned int bh_size;
61 lwp_mutex_t bh_lock;
62 unsigned int bh_end;
63 unsigned int bh_bktcnt;
64 unsigned int bh_strcur; /* current strbuff ptr */
65 unsigned int bh_strend; /* end of current strbuf */
66 lwp_mutex_t bh_strlock; /* mutex to protect strings */
67 binding_bucket bh_bkts[DEFBKTS];
68 } bindhead;
70 #ifdef __cplusplus
72 #endif
74 #endif /* _BINDINGS_H */