+static unsigned long
+lttng_event_rule_syscall_hash(
+ const struct lttng_event_rule *rule)
+{
+ unsigned long hash;
+ struct lttng_event_rule_syscall *syscall_rule =
+ container_of(rule, typeof(*syscall_rule), parent);
+
+ hash = hash_key_ulong((void *) LTTNG_EVENT_RULE_TYPE_SYSCALL,
+ lttng_ht_seed);
+ hash ^= hash_key_str(syscall_rule->pattern, lttng_ht_seed);
+ if (syscall_rule->filter_expression) {
+ hash ^= hash_key_str(syscall_rule->filter_expression,
+ lttng_ht_seed);
+ }
+
+ return hash;
+}
+