mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter.Benie@mvhi.com (Peter Benie)
To: linux-kernel@vger.kernel.org
Subject: Does cli() need to be called before reading avenrun?
Date: Thu, 2 Jan 2003 00:39:54 +0000	[thread overview]
Message-ID: <15891.35418.412034.594225@server.axiom.internal> (raw)

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

             reply	other threads:[~2003-01-02  0:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-02  0:39 Peter Benie [this message]
2003-01-02  0:53 ` Robert Love
2003-01-02 10:38   ` Peter Benie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=15891.35418.412034.594225@server.axiom.internal \
    --to=peter.benie@mvhi.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®