/* * Kernel module for testing static keys. * * Copyright 2015 Akamai Technologies Inc. All Rights Reserved * * Authors: * Jason Baron <jbaron@akamai.com> * * This software is licensed under the terms of the GNU General Public * License version 2, as published by the Free Software Foundation, and * may be copied, distributed, and modified under those terms. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ #include <linux/module.h> #include <linux/jump_label.h> /* old keys */ struct static_key base_old_true_key = STATIC_KEY_INIT_TRUE; EXPORT_SYMBOL_GPL(base_old_true_key); struct static_key base_inv_old_true_key = STATIC_KEY_INIT_TRUE; EXPORT_SYMBOL_GPL(base_inv_old_true_key); struct static_key base_old_false_key = STATIC_KEY_INIT_FALSE; EXPORT_SYMBOL_GPL(base_old_false_key); struct static_key base_inv_old_false_key = STATIC_KEY_INIT_FALSE; EXPORT_SYMBOL_GPL(base_inv_old_false_key); /* new keys */ DEFINE_STATIC_KEY_TRUE(base_true_key); EXPORT_SYMBOL_GPL(base_true_key); DEFINE_STATIC_KEY_TRUE(base_inv_true_key); EXPORT_SYMBOL_GPL(base_inv_true_key); DEFINE_STATIC_KEY_FALSE(base_false_key); EXPORT_SYMBOL_GPL(base_false_key); DEFINE_STATIC_KEY_FALSE(base_inv_false_key); EXPORT_SYMBOL_GPL(base_inv_false_key);
static void invert_key(struct static_key *key) { if (static_key_enabled(key)) static_key_disable(key); else static_key_enable(key); }Contributors
Person | Tokens | Prop | Commits | CommitProp | |
jason baron | jason baron | 29 | 100.00% | 1 | 100.00% |
Total | 29 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
jason baron | jason baron | 39 | 97.50% | 1 | 50.00% |
ingo molnar | ingo molnar | 1 | 2.50% | 1 | 50.00% |
Total | 40 | 100.00% | 2 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
jason baron | jason baron | 7 | 87.50% | 1 | 50.00% |
ingo molnar | ingo molnar | 1 | 12.50% | 1 | 50.00% |
Total | 8 | 100.00% | 2 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
jason baron | jason baron | 185 | 97.37% | 1 | 50.00% |
ingo molnar | ingo molnar | 5 | 2.63% | 1 | 50.00% |
Total | 190 | 100.00% | 2 | 100.00% |