Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 May 2003 14:44:24 -0700 (PDT)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/ia64/include cpufunc.h
Message-ID:  <200305242144.h4OLiOwa006885@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
marcel      2003/05/24 14:44:24 PDT

  FreeBSD src repository

  Modified files:
    sys/ia64/include     cpufunc.h 
  Log:
  Be more careful how we restore interrupts. Don't rewrite most of the
  PSR only to achieve setting PSR.i back to it's previous value. It
  makes it impossible to change any of the 30+ other unrelated bits
  when done between intr_disable() and intr_restore(). That's bad.
  
  Instead have intr_disable() return 1 when interrupts were previously
  enabled and 0 otherwise and only enable interrupts in intr_restore()
  when given a non-0 value.
  
  This change specifically disallows using intr_restore() to disable
  interrupts. The reason is simple: interrupts only need to be restored
  after they are being disabled, which means that intr_restore() is
  called with interrupts disabled and we only need to enable them if
  they were previously enabled.
  
  This change does not fix any bugs, other than that it bugged me...
  
  Approved by: re@ (blanket)
  
  Revision  Changes    Path
  1.17      +4 -3      src/sys/ia64/include/cpufunc.h



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200305242144.h4OLiOwa006885>