cvs commit: src/sys/i386/i386 trap.c

Bruce Evans bde at FreeBSD.org
Mon Feb 2 22:35:31 PST 2004


bde         2004/02/02 22:35:30 PST

  FreeBSD src repository

  Modified files:
    sys/i386/i386        trap.c 
  Log:
  Removed bogus checks that (PCPU_GET(curpcb) != NULL).  Rev.1.586 of
  machdep.c fixed the missing early initialization of curpcb, so curpcb
  is now always set together with curthread and it cannot be NULL except
  before the IDT has been set up (so trap() is unreachable) or after a
  memory error.  In any case, it was often used without checking.
  
  curcpb shouldn't exist anyway.  It doesn't exist for most non-i386 arches.
  It just caches curthread->td_pcb in a global.  This was a better idea
  before it was per-cpu.  trap() and some other places can get at it more
  efficiently using td->td_pcb instead of PCPU_GET(curpcb).  The main
  exception is support.s which mostly wants only curpcb->pcb_onfault.
  
  Revision  Changes    Path
  1.263     +1 -3      src/sys/i386/i386/trap.c


More information about the cvs-src mailing list