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.
157 struct nss_src_state *src; /* Pointer to array[max_src] */
940 struct nss_src_state *src = &s->src[n_src];
945 if (src->n_dormant > 0) {
946 src->n_dormant--;
947 src->n_active++;
949 be = src->dormant.single;
951 be = src->dormant.multi[src->n_dormant];
956 if (src->be_constr == 0) {
963 src->lkp->service_name, &src->finder_priv);
965 src->be_constr = c;
966 src->finder = bf;
970 if (src->be_constr == 0) {
977 if (src->n_active < s->p.max_active_per_src) {
978 be = (*src->be_constr)(s->p.name,
979 src->lkp->service_name, 0 /* === unimplemented */);
981 src->n_active++;
983 } else if (src->n_active == 0) {
996 src->n_waiting++;
999 (void) cond_wait(&src->wanna_be, &(*rootpp)->lock);
1002 src->n_waiting--;
1018 struct nss_src_state *src = &s->src[n_src];
1024 src->n_active--;
1026 if (src->n_dormant < s->p.max_dormant_per_src) {
1028 src->dormant.single = be;
1029 src->n_dormant++;
1030 } else if (src->dormant.multi != 0 ||
1031 (src->dormant.multi =
1034 src->dormant.multi[src->n_dormant] = be;
1035 src->n_dormant++;
1044 if (src->n_waiting > 0) {
1045 (void) cond_signal(&src->wanna_be);
1141 (s->src = libc_malloc(s->max_src * sizeof (*s->src))) == 0) {
1147 s->src[n_src].lkp = lkp;
1148 (void) cond_init(&s->src[n_src].wanna_be, USYNC_THREAD, 0);
1156 _nss_src_state_destr(struct nss_src_state *src, int max_dormant)
1159 if (src->n_dormant != 0) {
1160 (void) NSS_INVOKE_DBOP(src->dormant.single,
1163 } else if (src->dormant.multi != 0) {
1166 for (n = 0; n < src->n_dormant; n++) {
1167 (void) NSS_INVOKE_DBOP(src->dormant.multi[n],
1170 libc_free(src->dormant.multi);
1173 /* cond_destroy(&src->wanna_be); */
1175 if (src->finder != 0) {
1176 (*src->finder->delete)(src->finder_priv, src->be_constr);
1206 if (s->src != 0) {
1210 _nss_src_state_destr(&s->src[n_src],
1213 libc_free(s->src);
1439 s->src[n_src].lkp);
1447 s->src[n_src].lkp);
1449 s->src[n_src].lkp));
1454 if (__NSW_ACTION_V1(s->src[n_src].lkp, res) == __NSW_RETURN) {
1719 if (__NSW_ACTION_V1(s->src[n_src].lkp, res) == __NSW_RETURN) {