Lines Matching defs:sp
36 ses_plugin_ctlpage_lookup(ses_plugin_t *sp, ses_snap_t *snap, int pagenum,
50 return (dp->spd_ctl_fill(sp, pp->ssp_page,
61 ses_plugin_t *sp;
63 for (sp = tp->st_plugin_first; sp != NULL; sp = sp->sp_next) {
64 if (sp->sp_node_parse == NULL)
67 if (sp->sp_node_parse(sp, np) != 0)
78 ses_plugin_t *sp;
99 for (sp = tp->st_plugin_first; sp != NULL; sp = sp->sp_next) {
100 if (sp->sp_node_ctl == NULL)
103 if (sp->sp_node_ctl(sp, np, op, nvl) != 0) {
128 ses_plugin_page_lookup(ses_plugin_t *sp, ses_snap_t *snap, int pagenum,
132 ses_target_t *tp = sp->sp_target;
142 return (dp->spd_index(sp, np, pp->ssp_page, pp->ssp_len,
153 ses_plugin_t *sp;
156 for (sp = tp->st_plugin_first; sp != NULL; sp = sp->sp_next) {
157 if (sp->sp_pages == NULL)
160 for (dp = &sp->sp_pages[0]; dp->spd_pagenum != -1;
176 ses_plugin_register(ses_plugin_t *sp, int version, ses_plugin_config_t *scp)
181 sp->sp_pages = scp->spc_pages;
182 sp->sp_node_parse = scp->spc_node_parse;
183 sp->sp_node_ctl = scp->spc_node_ctl;
189 ses_plugin_setspecific(ses_plugin_t *sp, void *data)
191 sp->sp_data = data;
195 ses_plugin_getspecific(ses_plugin_t *sp)
197 return (sp->sp_data);
211 ses_plugin_destroy(ses_plugin_t *sp)
213 if (sp->sp_initialized && sp->sp_fini != NULL)
214 sp->sp_fini(sp);
217 (void) dlclose(sp->sp_object);
219 ses_free(sp);
225 ses_plugin_t *sp, **loc;
232 if ((sp = ses_zalloc(sizeof (ses_plugin_t))) == NULL) {
237 sp->sp_object = obj;
238 sp->sp_init = (int (*)())dlsym(obj, "_ses_init");
239 sp->sp_fini = (void (*)())dlsym(obj, "_ses_fini");
240 sp->sp_target = tp;
242 if (sp->sp_init == NULL) {
243 ses_plugin_destroy(sp);
253 sp->sp_priority = ses_priority();
255 sp->sp_priority |= (uint64_t)pass << 32;
258 if ((*loc)->sp_priority > sp->sp_priority)
263 (*loc)->sp_prev = sp;
265 tp->st_plugin_last = sp;
267 sp->sp_next = *loc;
268 *loc = sp;
270 if (sp->sp_init(sp) != 0)
272 sp->sp_initialized = B_TRUE;
389 ses_plugin_t *sp;
391 while ((sp = tp->st_plugin_first) != NULL) {
392 tp->st_plugin_first = sp->sp_next;
393 ses_plugin_destroy(sp);