Lines Matching refs:src

8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
131 struct nss_src_state *src; /* Pointer to array[max_src] */
763 struct nss_src_state *src = &s->src[n_src];
768 if (src->n_dormant > 0) {
769 src->n_dormant--;
770 src->n_active++;
772 be = src->dormant.single;
774 be = src->dormant.multi[src->n_dormant];
779 if (src->be_constr == 0) {
786 src->lkp->service_name, &src->finder_priv);
788 src->be_constr = c;
789 src->finder = bf;
793 if (src->be_constr == 0) {
800 if (src->n_active < s->p.max_active_per_src) {
801 be = (*src->be_constr)(s->p.name,
802 src->lkp->service_name, 0 /* === unimplemented */);
804 src->n_active++;
806 } else if (src->n_active == 0) {
819 src->n_waiting++;
822 (void) cond_wait(&src->wanna_be, &(*rootpp)->lock);
825 src->n_waiting--;
841 struct nss_src_state *src = &s->src[n_src];
847 src->n_active--;
849 if (src->n_dormant < s->p.max_dormant_per_src) {
851 src->dormant.single = be;
852 src->n_dormant++;
853 } else if (src->dormant.multi != 0 ||
854 (src->dormant.multi =
857 src->dormant.multi[src->n_dormant] = be;
858 src->n_dormant++;
867 if (src->n_waiting > 0) {
868 (void) cond_signal(&src->wanna_be);
923 (s->src = libc_malloc(s->max_src * sizeof (*s->src))) == 0) {
929 s->src[n_src].lkp = lkp;
930 (void) cond_init(&s->src[n_src].wanna_be, USYNC_THREAD, 0);
937 _nss_src_state_destr(struct nss_src_state *src, int max_dormant)
940 if (src->n_dormant != 0) {
941 (void) NSS_INVOKE_DBOP(src->dormant.single,
944 } else if (src->dormant.multi != 0) {
947 for (n = 0; n < src->n_dormant; n++) {
948 (void) NSS_INVOKE_DBOP(src->dormant.multi[n],
951 libc_free(src->dormant.multi);
954 /* cond_destroy(&src->wanna_be); */
956 if (src->finder != 0) {
957 (*src->finder->delete)(src->finder_priv, src->be_constr);
987 if (s->src != 0) {
991 _nss_src_state_destr(&s->src[n_src],
994 libc_free(s->src);
1215 s->src[n_src].lkp);
1223 s->src[n_src].lkp);
1225 s->src[n_src].lkp));
1230 if (__NSW_ACTION_V1(s->src[n_src].lkp, res) == __NSW_RETURN) {
1492 if (__NSW_ACTION_V1(s->src[n_src].lkp, res) == __NSW_RETURN) {