Lines Matching defs:context
59 static u32 context_to_sid(struct sidtab *s, struct context *context, u32 hash)
68 if (context_cmp(&entry->context, context)) {
77 int sidtab_set_initial(struct sidtab *s, u32 sid, struct context *context)
88 rc = context_cpy(&isid->entry.context, context);
97 hash = context_compute_hash(context);
100 * Multiple initial sids may map to the same context. Check that this
101 * context is not already represented in the context_to_sid hashtable
105 if (!context_to_sid(s, context, hash)) {
248 if (entry && (!entry->context.len || force))
265 int sidtab_context_to_sid(struct sidtab *s, struct context *context,
269 u32 count, hash = context_compute_hash(context);
274 *sid = context_to_sid(s, context, hash);
282 *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
326 context_destroy(&dst->context);
331 context, &dst_convert->context,
334 context_destroy(&dst->context);
338 dst_convert->hash = context_compute_hash(&dst_convert->context);
345 if (context->len)
347 context->str);
369 entry->hash = context_compute_hash(&entry->context);
410 &esrc->ptr_leaf->entries[i].context,
411 &edst->ptr_leaf->entries[i].context,
505 context_destroy(&entry->context);
551 * with the isids array and context tree, and so don't need
565 if (entry->context.len)
609 if (entry->context.len)