Lines Matching defs:bhp

47 static bindhead		*bhp = NULL;
121 if ((new_bhp = mmap(0, bhp->bh_size, PROT_READ | PROT_WRITE,
126 bt_unlock(&bhp->bh_lock);
132 (void) munmap((caddr_t)bhp, current_map_len);
133 bhp = (bindhead *)new_bhp;
134 current_map_len = bhp->bh_size;
145 bt_unlock(&bhp->bh_lock);
148 if (ftruncate(fd, bhp->bh_size + BLKSIZE) == -1) {
151 bt_unlock(&bhp->bh_lock);
154 bhp->bh_size += BLKSIZE;
162 bt_lock(&bhp->bh_lock);
163 while (bhp->bh_end + STRBLKSIZE > bhp->bh_size)
166 bhp->bh_strcur = bhp->bh_end;
167 bhp->bh_end = bhp->bh_strend = bhp->bh_strcur + STRBLKSIZE;
168 bt_unlock(&bhp->bh_lock);
178 bt_lock(&bhp->bh_strlock);
185 if ((slen + 1) > (bhp->bh_strend - bhp->bh_strcur))
187 bptr = bhp->bh_strcur;
188 sptr = (char *)bhp + bhp->bh_strcur;
189 bhp->bh_strcur += slen + 1;
192 bt_unlock(&bhp->bh_strlock);
201 bt_lock(&bhp->bh_lock);
202 while ((sizeof (binding_entry) + bhp->bh_end) > bhp->bh_size)
204 new_ent = bhp->bh_end;
205 bhp->bh_end += sizeof (binding_entry);
206 bt_unlock(&bhp->bh_lock);
217 (void) memcpy(&bhp->bh_lock, &sharedmutex, sizeof (lwp_mutex_t));
219 (void) memcpy(&bhp->bh_bkts[i].bb_lock, &sharedmutex,
222 (void) memcpy(&bhp->bh_strlock, &sharedmutex, sizeof (lwp_mutex_t));
254 if ((bhp = (bindhead *)mmap(0, init_size,
267 bt_lock(&bhp->bh_lock);
268 bhp->bh_vers = BINDCURVERS;
269 current_map_len = bhp->bh_size = init_size;
270 bhp->bh_end = sizeof (bindhead);
271 bhp->bh_bktcnt = DEFBKTS;
272 bt_unlock(&bhp->bh_lock);
290 if ((bhp = (bindhead *)mmap(0, stbuf.st_size,
302 if (bhp == NULL) {
308 if (bhp->bh_vers == 0) {
313 if (bhp->bh_vers == 0) {
319 bt_lock(&bhp->bh_lock);
321 if (bhp->bh_size != current_map_len)
332 bt_unlock(&bhp->bh_lock);
395 bktno = ehash(sym_name) % bhp->bh_bktcnt;
397 bt_lock(&bhp->bh_bkts[bktno].bb_lock);
403 if (bhp->bh_size != current_map_len) {
410 bt_unlock(&bhp->bh_lock);
413 bt_lock(&bhp->bh_lock);
415 bt_unlock(&bhp->bh_lock);
419 if (bhp->bh_bkts[bktno].bb_head == NULL) {
429 bep = (binding_entry *)((char *)bhp + be_off);
434 bhp->bh_bkts[bktno].bb_head = be_off;
448 cur_off = bhp->bh_bkts[bktno].bb_head;
450 cur_bep = (binding_entry *)((char *)bhp +
452 while (cur_off && (strcmp_res = strcmp((char *)bhp +
457 cur_bep = (binding_entry *)((char *)bhp +
469 while (cur_off && (strcmp_res = strcmp((char *)bhp +
474 cur_bep = (binding_entry *)((char *)bhp +
494 new_bep = (binding_entry *)((char *)bhp +
502 prev_bep = (binding_entry *)((char *)bhp +
509 bhp->bh_bkts[bktno].bb_head = new_off;
513 bt_unlock(&bhp->bh_bkts[bktno].bb_lock);