forked from TencentOS/TencentOS-kernel
Merge pull request #37 from Tencent/zgpeng
proc: fix the display error of the processes field in /proc/stat
This commit is contained in:
commit
9c2652e3d8
|
|
@ -118,7 +118,7 @@ static int show_bt_stat(struct seq_file *p, void *v)
|
|||
seq_printf(p,
|
||||
"\nctxt %llu\n"
|
||||
"btime %lu\n"
|
||||
"processes %d\n"
|
||||
"processes %lu\n"
|
||||
"procs_running %lu\n"
|
||||
"procs_blocked %lu\n",
|
||||
nr_context_switches(),
|
||||
|
|
|
|||
|
|
@ -169,7 +169,7 @@ static int show_stat(struct seq_file *p, void *v)
|
|||
seq_printf(p,
|
||||
"\nctxt %llu\n"
|
||||
"btime %llu\n"
|
||||
"processes %d\n"
|
||||
"processes %lu\n"
|
||||
"procs_running %lu\n"
|
||||
"procs_blocked %lu\n",
|
||||
nr_context_switches(),
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
DECLARE_PER_CPU(unsigned long, total_forks);
|
||||
extern int nr_threads;
|
||||
DECLARE_PER_CPU(unsigned long, process_counts);
|
||||
extern int nr_forks(void);
|
||||
extern unsigned long nr_forks(void);
|
||||
extern int nr_processes(void);
|
||||
extern unsigned long nr_running(void);
|
||||
extern unsigned long nr_running_cpu(int cpu);
|
||||
|
|
|
|||
|
|
@ -133,10 +133,10 @@ int lockdep_tasklist_lock_is_held(void)
|
|||
EXPORT_SYMBOL_GPL(lockdep_tasklist_lock_is_held);
|
||||
#endif /* #ifdef CONFIG_PROVE_RCU */
|
||||
|
||||
int nr_forks(void)
|
||||
unsigned long nr_forks(void)
|
||||
{
|
||||
int cpu;
|
||||
int total = 0;
|
||||
unsigned long total = 0;
|
||||
|
||||
for_each_possible_cpu(cpu)
|
||||
total += per_cpu(total_forks, cpu);
|
||||
|
|
|
|||
Loading…
Reference in New Issue