Home
last modified time | relevance | path

Searched refs:bhp (Results 1 – 14 of 14) sorted by relevance

/titanic_41/usr/src/cmd/sgs/link_audit/common/
H A Dbindings.c47 static bindhead *bhp = NULL; variable
121 if ((new_bhp = mmap(0, bhp->bh_size, PROT_READ | PROT_WRITE, in remap_buffer()
126 bt_unlock(&bhp->bh_lock); in remap_buffer()
132 (void) munmap((caddr_t)bhp, current_map_len); in remap_buffer()
133 bhp = (bindhead *)new_bhp; in remap_buffer()
134 current_map_len = bhp->bh_size; in remap_buffer()
145 bt_unlock(&bhp->bh_lock); in grow_buffer()
148 if (ftruncate(fd, bhp->bh_size + BLKSIZE) == -1) { in grow_buffer()
151 bt_unlock(&bhp->bh_lock); in grow_buffer()
154 bhp->bh_size += BLKSIZE; in grow_buffer()
[all …]
H A Ddumpbind.c62 query_buffer_locks(bindhead * bhp) in query_buffer_locks() argument
67 if (query_lock(&bhp->bh_strlock) == 1) in query_buffer_locks()
73 if (query_lock(&bhp->bh_lock) == 1) in query_buffer_locks()
78 (void) printf("Buckets: %d - locks held:\n", bhp->bh_bktcnt); in query_buffer_locks()
79 for (i = 0; i < bhp->bh_bktcnt; i++) { in query_buffer_locks()
80 if (query_lock(&bhp->bh_bkts[i].bb_lock) == 1) { in query_buffer_locks()
92 clear_buffer_locks(bindhead * bhp) in clear_buffer_locks() argument
96 if (query_lock(&bhp->bh_strlock) == 1) { in clear_buffer_locks()
97 (void) _lwp_mutex_unlock(&bhp->bh_strlock); in clear_buffer_locks()
100 if (query_lock(&bhp->bh_lock) == 1) { in clear_buffer_locks()
[all …]
/titanic_41/usr/src/cmd/fm/fmd/common/
H A Dfmd_buf.c59 fmd_buf_hash_create(fmd_buf_hash_t *bhp) in fmd_buf_hash_create() argument
61 bhp->bh_hashlen = fmd.d_str_buckets; in fmd_buf_hash_create()
62 bhp->bh_hash = fmd_zalloc(sizeof (void *) * bhp->bh_hashlen, FMD_SLEEP); in fmd_buf_hash_create()
63 bhp->bh_count = 0; in fmd_buf_hash_create()
67 fmd_buf_hash_destroy(fmd_buf_hash_t *bhp) in fmd_buf_hash_destroy() argument
73 for (i = 0; i < bhp->bh_hashlen; i++) { in fmd_buf_hash_destroy()
74 for (bp = bhp->bh_hash[i]; bp != NULL; bp = np) { in fmd_buf_hash_destroy()
81 fmd_free(bhp->bh_hash, sizeof (void *) * bhp->bh_hashlen); in fmd_buf_hash_destroy()
82 bzero(bhp, sizeof (fmd_buf_hash_t)); in fmd_buf_hash_destroy()
87 fmd_buf_hash_apply(fmd_buf_hash_t *bhp, fmd_buf_f *func, void *arg) in fmd_buf_hash_apply() argument
[all …]
H A Dfmd_api.c1495 fmd_buf_hash_t *bhp = fmd_buf_gethash(mp, cp); in fmd_buf_create() local
1496 fmd_buf_t *bp = fmd_buf_lookup(bhp, name); in fmd_buf_create()
1513 bp = fmd_buf_insert(bhp, name, size); in fmd_buf_create()
1532 fmd_buf_hash_t *bhp = fmd_buf_gethash(mp, cp); in fmd_buf_destroy() local
1533 fmd_buf_t *bp = fmd_buf_lookup(bhp, name); in fmd_buf_destroy()
1537 fmd_buf_delete(bhp, name); in fmd_buf_destroy()
1572 fmd_buf_hash_t *bhp = fmd_buf_gethash(mp, cp); in fmd_buf_write() local
1573 fmd_buf_t *bp = fmd_buf_lookup(bhp, name); in fmd_buf_write()
1590 bp = fmd_buf_insert(bhp, name, size); in fmd_buf_write()
1613 fmd_buf_hash_t *bhp = fmd_buf_gethash(mp, cp); in fmd_buf_size() local
[all …]
/titanic_41/usr/src/cmd/sendmail/db/mp/
H A Dmp_fget.c37 BH *bhp; local
93 bhp = NULL;
166 for (bhp = SH_TAILQ_FIRST(&dbmp->htab[bucket], __bh);
167 bhp != NULL; bhp = SH_TAILQ_NEXT(bhp, hq, __bh)) {
169 if (bhp->pgno != *pgnoaddr || bhp->mf_offset != mf_offset)
173 if (bhp->ref == UINT16_T_MAX) {
176 __memp_fn(dbmfp), (u_long)bhp->pgno);
187 ++bhp->ref;
199 for (first = 1; F_ISSET(bhp, BH_LOCKED); first = 0) {
211 LOCKBUFFER(dbmp, bhp);
[all …]
H A Dmp_sync.c38 BH *bhp, **bharray; local
131 for (bhp = SH_TAILQ_FIRST(&mp->bhq, __bh);
132 bhp != NULL; bhp = SH_TAILQ_NEXT(bhp, q, __bh))
133 if (F_ISSET(bhp, BH_DIRTY) || bhp->ref != 0) {
134 F_SET(bhp, BH_WRITE);
138 mfp = R_ADDR(dbmp, bhp->mf_offset);
157 if (bhp->ref == 0) {
158 ++bhp->ref;
159 bharray[ar_cnt] = bhp;
166 if (F_ISSET(bhp, BH_WRITE))
[all …]
H A Dmp_bh.c37 __memp_bhwrite(dbmp, mfp, bhp, restartp, wrotep) in __memp_bhwrite() argument
40 BH *bhp;
129 found: ret = __memp_pgwrite(dbmfp, bhp, restartp, wrotep);
147 __memp_pgread(dbmfp, bhp, can_create) in __memp_pgread() argument
149 BH *bhp;
163 F_SET(bhp, BH_LOCKED | BH_TRASH);
164 LOCKBUFFER(dbmp, bhp);
185 db_io.pgno = bhp->pgno;
186 db_io.buf = bhp->buf;
201 __memp_fn(dbmfp), (u_long)bhp->pgno);
[all …]
H A Dmp_region.c58 BH *bhp, *nbhp; local
82 for (bhp =
83 SH_TAILQ_FIRST(&mp->bhfq, __bh); bhp != NULL; bhp = nbhp) {
84 nbhp = SH_TAILQ_NEXT(bhp, q, __bh);
86 if (__db_shsizeof(bhp) == len) {
87 SH_TAILQ_REMOVE(&mp->bhfq, bhp, q, __bh);
89 *offsetp = R_OFFSET(dbmp, bhp);
90 *(void **)retp = bhp;
97 for (bhp =
98 SH_TAILQ_FIRST(&mp->bhfq, __bh); bhp != NULL; bhp = nbhp) {
[all …]
H A Dmp_fput.c35 BH *bhp; local
85 bhp = (BH *)((u_int8_t *)pgaddr - SSZA(BH, buf));
88 if (LF_ISSET(DB_MPOOL_CLEAN) && F_ISSET(bhp, BH_DIRTY)) {
91 F_CLR(bhp, BH_DIRTY);
93 if (LF_ISSET(DB_MPOOL_DIRTY) && !F_ISSET(bhp, BH_DIRTY)) {
96 F_SET(bhp, BH_DIRTY);
99 F_SET(bhp, BH_DISCARD);
105 if (bhp->ref == 0) {
107 __memp_fn(dbmfp), (u_long)bhp->pgno);
117 if (--bhp->ref > 0) {
[all …]
H A Dmp_pr.c171 BH *bhp; local
242 for (bhp = SH_TAILQ_FIRST(&dbmp->htab[bucket], __bh);
243 bhp != NULL; bhp = SH_TAILQ_NEXT(bhp, hq, __bh))
244 __memp_pbh(dbmp, bhp, fmap, fp);
252 for (bhp = SH_TAILQ_FIRST(&dbmp->mp->bhq, __bh);
253 bhp != NULL; bhp = SH_TAILQ_NEXT(bhp, q, __bh))
254 __memp_pbh(dbmp, bhp, fmap, fp);
271 __memp_pbh(dbmp, bhp, fmap, fp) in __memp_pbh() argument
273 BH *bhp;
289 if (fmap[i] == INVALID || fmap[i] == bhp->mf_offset)
[all …]
H A Dmp_fset.c35 BH *bhp; local
64 bhp = (BH *)((u_int8_t *)pgaddr - SSZA(BH, buf));
68 if (LF_ISSET(DB_MPOOL_CLEAN) && F_ISSET(bhp, BH_DIRTY)) {
71 F_CLR(bhp, BH_DIRTY);
73 if (LF_ISSET(DB_MPOOL_DIRTY) && !F_ISSET(bhp, BH_DIRTY)) {
76 F_SET(bhp, BH_DIRTY);
79 F_SET(bhp, BH_DISCARD);
H A Dmp_fopen.c501 BH *bhp, *nbhp; local
524 for (bhp = SH_TAILQ_FIRST(&mp->bhq, __bh); bhp != NULL; bhp = nbhp) {
525 nbhp = SH_TAILQ_NEXT(bhp, q, __bh);
529 if (F_ISSET(bhp, BH_DIRTY))
533 (u_long)bhp->pgno, (u_long)bhp->ref);
536 if (bhp->mf_offset == mf_offset) {
537 if (F_ISSET(bhp, BH_DIRTY)) {
541 __memp_bhfree(dbmp, mfp, bhp, 0);
542 SH_TAILQ_INSERT_HEAD(&mp->bhfq, bhp, q, __bh);
/titanic_41/usr/src/lib/libbrand/common/
H A Dlibbrand.c228 struct brand_handle *bhp; in brand_open() local
251 if ((bhp = malloc(sizeof (struct brand_handle))) == NULL) in brand_open()
253 bzero(bhp, sizeof (struct brand_handle)); in brand_open()
255 (void) strcpy(bhp->bh_name, name); in brand_open()
262 if ((bhp->bh_config = open_xml_file(path)) == NULL) { in brand_open()
263 brand_close((brand_handle_t)bhp); in brand_open()
271 if ((node = xmlDocGetRootElement(bhp->bh_config)) == NULL) { in brand_open()
272 brand_close((brand_handle_t)bhp); in brand_open()
277 brand_close((brand_handle_t)bhp); in brand_open()
282 brand_close((brand_handle_t)bhp); in brand_open()
[all …]
/titanic_41/usr/src/cmd/sendmail/db/include/
H A Dmp.h102 #define LOCKBUFFER(dbmp, bhp) \ argument
104 (void)__db_mutex_lock(&(bhp)->mutex, (dbmp)->reginfo.fd)
105 #define UNLOCKBUFFER(dbmp, bhp) \ argument
107 (void)__db_mutex_unlock(&(bhp)->mutex, (dbmp)->reginfo.fd)