Lines Matching defs:context
58 static u32 context_to_sid(struct sidtab *s, struct context *context, u32 hash)
67 if (context_cmp(&entry->context, context)) {
76 int sidtab_set_initial(struct sidtab *s, u32 sid, struct context *context)
87 rc = context_cpy(&isid->entry.context, context);
96 hash = context_compute_hash(context);
99 * Multiple initial sids may map to the same context. Check that this
100 * context is not already represented in the context_to_sid hashtable
104 if (!context_to_sid(s, context, hash)) {
247 if (entry && (!entry->context.len || force))
264 int sidtab_context_to_sid(struct sidtab *s, struct context *context,
268 u32 count, hash = context_compute_hash(context);
273 *sid = context_to_sid(s, context, hash);
281 *sid = context_to_sid(s, context, hash);
302 /* insert context into new entry */
311 rc = context_cpy(&dst->context, context);
316 * if we are building a new sidtab, we need to convert the context
323 context_destroy(&dst->context);
327 rc = convert->func(context, &dst_convert->context,
330 context_destroy(&dst->context);
334 dst_convert->hash = context_compute_hash(&dst_convert->context);
341 if (context->len)
343 context->str);
365 entry->hash = context_compute_hash(&entry->context);
405 rc = convert->func(&esrc->ptr_leaf->entries[i].context,
406 &edst->ptr_leaf->entries[i].context,
500 context_destroy(&entry->context);
546 * with the isids array and context tree, and so don't need
560 if (entry->context.len)
604 if (entry->context.len)