!C99Shell v. 1.0 pre-release build #13!

Software: Apache/2.0.54 (Unix) mod_perl/1.99_09 Perl/v5.8.0 mod_ssl/2.0.54 OpenSSL/0.9.7l DAV/2 FrontPage/5.0.2.2635 PHP/4.4.0 mod_gzip/2.0.26.1a 

uname -a: Linux snow.he.net 4.4.276-v2-mono-1 #1 SMP Wed Jul 21 11:21:17 PDT 2021 i686 

uid=99(nobody) gid=98(nobody) groups=98(nobody) 

Safe-mode: OFF (not secure)

/usr/src/linux-2.4.18-xfs-1.1/arch/parisc/kernel/   drwxr-xr-x
Free 318.33 GB of 458.09 GB (69.49%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     time.c (2.1 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
/*
 *  linux/arch/arm/kernel/time.c
 *
 *  Copyright (C) 1991, 1992, 1995  Linus Torvalds
 *  Modifications for ARM (C) 1994, 1995, 1996,1997 Russell King
 *  Copyright (C) 1999 SuSE GmbH, (Philipp Rumpf, prumpf@tux.org)
 *
 * 1994-07-02  Alan Modra
 *             fixed set_rtc_mmss, fixed time.year for >= 2000, new mktime
 * 1998-12-20  Updated NTP code according to technical memorandum Jan '96
 *             "A Kernel Model for Precision Timekeeping" by Dave Mills
 */
#include <linux/errno.h>
#include <linux/sched.h>
#include <linux/kernel.h>
#include <linux/param.h>
#include <linux/string.h>
#include <linux/mm.h>
#include <linux/interrupt.h>
#include <linux/time.h>
#include <linux/init.h>
#include <linux/smp.h>

#include <asm/uaccess.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/param.h>
#include <asm/pdc.h>
#include <asm/led.h>

#include <linux/timex.h>

extern rwlock_t xtime_lock;

static int timer_value;
static int timer_delta;
static struct pdc_tod tod_data __attribute__((aligned(8)));

void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
    int old;
    int lost = 0;
    int cr16;
    
    old = timer_value;

    cr16 = mfctl(16);
    while((timer_value - cr16) < (timer_delta / 2)) {
        timer_value += timer_delta;
        lost++;
    }

    mtctl(timer_value ,16);

    do_timer(regs);
    
    led_interrupt_func();
}

void do_gettimeofday(struct timeval *tv)
{
    unsigned long flags;
    
    read_lock_irqsave(&xtime_lock, flags);
    tv->tv_sec = xtime.tv_sec;
    tv->tv_usec = xtime.tv_usec;
    read_unlock_irqrestore(&xtime_lock, flags);

}

void do_settimeofday(struct timeval *tv)
{
    write_lock_irq(&xtime_lock);
    xtime.tv_sec = tv->tv_sec;
    xtime.tv_usec = tv->tv_usec;
    write_unlock_irq(&xtime_lock);
}

void __init time_init(void)
{
    timer_delta = (100 * PAGE0->mem_10msec) / HZ;

    /* make the first timer interrupt go off in one second */
    timer_value = mfctl(16) + (HZ * timer_delta);
    mtctl(timer_value, 16);


    if(pdc_tod_read(&tod_data) == 0) {
        xtime.tv_sec = tod_data.tod_sec;
        xtime.tv_usec = tod_data.tod_usec;
    } else {
        printk(KERN_ERR "Error reading tod clock\n");
            xtime.tv_sec = 0;
        xtime.tv_usec = 0;
    }

}


:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 1.0 pre-release build #13 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0044 ]--