Architectures must implement these interfaces exactly as defined in
the include/linux header files. 2.1 <linux/bios32.h>
extern unsigned int probe_irq_on(void); extern int probe_irq_off(unsigned int);
Autoprobing for irqs: probe_irq_on() and probe_irq_off() provide robust primitives for accurate IRQ probing during kernel initialization. They are reasonably simple to use, are not ,,fooled'' by spurious interrupts, and, unlike other attempts at IRQ probing, they do not get hung on stuck interrupts (such as unused PS2 mouse interfaces on ASUS boards). For reasonably foolproof probing, use them as follows:
probe_irq_on() returns a mask of snarfed irq's, or 0 on failure.
probe_irq_off() takes the mask as a parameter, and returns the
irq number which occurred, or zero if none occurred, or a negative irq
number if more than one irq occurred. 2.3 <linux/mm.h>
void show_mem(void);
printk() information about memory usage.
void si_meminfo(struct sysinfo *val);
Dump memory information to val. 2.4 <linux/sched.h>
int request_irq(unsigned int irq, void (*handler)(int, void *, struct pt_regs *), unsigned long flags, const char *devname, void *dev_id); void free_irq(unsigned int irq, void *dev_id);
These routines register/unregister interrupt handlers.
On the i386, passing the registers is pretty pointless: I didn't find a single driver that makes any sensible use of it. (Well, the keyboard driver can print the register values when pressing some hotkey, but I did say sensible use, didn't I?)
Otherwise, the handler will be ,,slow:'' Slow handlers run with interrupts enabled. When they return, the kernel should execute bottom halfs, deliver signals and reschedule if necessary.
(See the Kernel Hacker's Guide for a more verbose description.)
void copy_thread(int nr, unsigned long clone_flags, unsigned long esp, struct task_struct * p, struct pt_regs * regs); void exit_thread(void); void flush_thread(void); void dump_thread(struct pt_regs * regs, struct user * dump); void release_thread(struct task_struct *dead_task);
Copy the current thread with registers regs to p, exit a
thread, recycle a thread (i.e., free a thread's resources), release a
thread (i.e., free a dead thread that already had been
exit_thread()'d) and dump a thread's state into a user strucure,
respectively. 2.5 <linux/time.h>
void do_gettimeofday(struct timeval *tv); void do_settimeofday(struct timeval *tv);
Get/set time using the machine's hardware. 2.6 <linux/vm86.h>
XXX