• Robert Love's avatar
    [PATCH] sys_sysinfo cleanup · 916e75e3
    Robert Love authored
    Looks like sys_sysinfo has not been touched in years.  Among other
    things, it uses a global cli() for protection; I switched it to an
    existing rwlock.  I also pulled it out of info.c and stuck it in timer.c
    (I choose timer.c because it shares dependencies there already).
    
    The details:
    
            - move sys_sysinfo to kernel/timer.c from kernel/info.c:
              why one small syscall got its own file is beyond me.
    
            - delete kernel/info.c
    
            - stop the global cli!  now grab a read_lock on xtime_lock.
              this is safe as we moved the write_unlock on xtime_lock
              down one line to cover the calculating of avenrun.
    
            - trivial code cleanup
    916e75e3
timer.c 24.7 KB