/* Copyright Victor Yodaiken 1999. 
   Released under the terms of the GNU Library GPL 
   */
   
#ifndef __rtl_h
#define __rtl_h

extern void rtl_make_rt_system_active(void); 
extern unsigned int rtl_rt_system_is_idle(void);
extern void rtl_make_rt_system_idle(void);
extern unsigned int rtl_hard_smp_processor_id(void);
extern void rtl_reschedule(unsigned int);

extern int rtl_get_soft_irq( void (*handler)(int, void *, struct pt_regs *),
		const char * devname);

extern int rtl_request_global_irq(unsigned int irq, 
		unsigned int (*handler)(unsigned int, struct pt_regs *));
extern int rtl_free_global_irq(unsigned int irq); 
extern void rtl_global_pend_irq(int ix);

/* if you don't say local, you mean global */
#define rtl_request_irq(x, y) rtl_request_global_irq(x, y)
#define rtl_free_irq(x) rtl_free_global_irq(x)

#ifdef __SMP__
int rtl_request_local_irq(int i, unsigned int (*handler)(struct pt_regs *r),
		unsigned int cpu);
int rtl_free_local_irq(int i, unsigned int cpu);

extern void rtl_local_pend_vec(int intvec,int cpu_id);

#endif

#endif
