Lines Matching refs:tsd
647 autofs_tsd_t *tsd = NULL; in autofs_get_buffer() local
652 (void) thr_getspecific(s_thr_key, (void **)&tsd); in autofs_get_buffer()
653 if (tsd == NULL) { in autofs_get_buffer()
654 tsd = (autofs_tsd_t *)malloc(sizeof (autofs_tsd_t)); in autofs_get_buffer()
655 if (tsd == NULL) { in autofs_get_buffer()
658 tsd->atsd_buf = malloc(size); in autofs_get_buffer()
659 if (tsd->atsd_buf != NULL) in autofs_get_buffer()
660 tsd->atsd_len = size; in autofs_get_buffer()
662 tsd->atsd_len = 0; in autofs_get_buffer()
663 (void) thr_setspecific(s_thr_key, tsd); in autofs_get_buffer()
665 if (tsd->atsd_buf && (tsd->atsd_len < size)) { in autofs_get_buffer()
666 free(tsd->atsd_buf); in autofs_get_buffer()
667 tsd->atsd_buf = malloc(size); in autofs_get_buffer()
668 if (tsd->atsd_buf != NULL) in autofs_get_buffer()
669 tsd->atsd_len = size; in autofs_get_buffer()
671 tsd->atsd_len = 0; in autofs_get_buffer()
675 if (tsd->atsd_buf) { in autofs_get_buffer()
676 bzero(tsd->atsd_buf, size); in autofs_get_buffer()
677 return (tsd->atsd_buf); in autofs_get_buffer()