Does cli() need to be called before reading avenrun?

From: Peter Benie (Peter.Benie@mvhi.com)
Date: Wed Jan 01 2003 - 19:39:54 EST


In kernel 2.4, in sys_sysinfo(), the code reads:

   cli();
   val.uptime = jiffies / HZ;

   val.loads[0] = avenrun[0] << (SI_LOAD_SHIFT - FSHIFT);
   val.loads[1] = avenrun[1] << (SI_LOAD_SHIFT - FSHIFT);
   val.loads[2] = avenrun[2] << (SI_LOAD_SHIFT - FSHIFT);

   val.procs = nr_threads-1;
   sti();

In loadavg_read_proc, the code is in essence the same, except that it
isn't wrapped in cli/sti.

Is there a reason for the cli?

Peter
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Jan 07 2003 - 22:00:16 EST