Interrupt 0x80 handling

Matthew Dillon dillon at apollo.backplane.com
Thu Aug 12 19:06:05 PDT 2004


:Hi,
:giving a look to interrupt 0x80 handling code (i386/i386/exception.s), I've
:met FAKE_MCOUNT/MEXITCOUNT system. FAKE_MCOUNT in the end calls _mcount
:(libkern/mcount.c) function which seems to be used for profiling purposes
:IMHO. It seems (reading comments in sys/gmon.h) that sysctl could be used
:to manage syscall profiling (kernel profiling?): Somebody can confirm that
:or I've misunderstood? I would like to know another thing too: why interrupt
:0x80 handler is implemented through a trap gate? An interrupt gate could
:not be more logical?
:
:thanks for answers,
:cheers
:
:rookie

    An interrupt gate will disable interrupts on entry (cli equivalent),
    while a trap gate does not.  There is no reason to disable interrupts
    in a system call so a trap gate is used. 

						-Matt



More information about the freebsd-hackers mailing list