cregit-Linux how code gets into the kernel

Release 4.17 fs/proc/softirqs.c

Directory: fs/proc
// SPDX-License-Identifier: GPL-2.0
#include <linux/init.h>
#include <linux/kernel_stat.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>

/*
 * /proc/softirqs  ... display the number of softirqs
 */

static int show_softirqs(struct seq_file *p, void *v) { int i, j; seq_puts(p, " "); for_each_possible_cpu(i) seq_printf(p, "CPU%-8d", i); seq_putc(p, '\n'); for (i = 0; i < NR_SOFTIRQS; i++) { seq_printf(p, "%12s:", softirq_to_name[i]); for_each_possible_cpu(j) seq_printf(p, " %10u", kstat_softirqs_cpu(i, j)); seq_putc(p, '\n'); } return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Keika Kobayashi9593.14%133.33%
Alexey Dobriyan54.90%133.33%
Davidlohr Bueso A21.96%133.33%
Total102100.00%3100.00%


static int softirqs_open(struct inode *inode, struct file *file) { return single_open(file, show_softirqs, NULL); }

Contributors

PersonTokensPropCommitsCommitProp
Keika Kobayashi26100.00%1100.00%
Total26100.00%1100.00%

static const struct file_operations proc_softirqs_operations = { .open = softirqs_open, .read = seq_read, .llseek = seq_lseek, .release = single_release, };
static int __init proc_softirqs_init(void) { proc_create("softirqs", 0, NULL, &proc_softirqs_operations); return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Keika Kobayashi24100.00%1100.00%
Total24100.00%1100.00%

fs_initcall(proc_softirqs_init);

Overall Contributors

PersonTokensPropCommitsCommitProp
Keika Kobayashi19095.48%120.00%
Alexey Dobriyan52.51%120.00%
Davidlohr Bueso A21.01%120.00%
Paul Gortmaker10.50%120.00%
Greg Kroah-Hartman10.50%120.00%
Total199100.00%5100.00%
Directory: fs/proc
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.