File: prototypes.h

package info (click to toggle)
irqbalance 0.12-7etch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 180 kB
  • ctags: 54
  • sloc: ansic: 493; sh: 94; xml: 31; makefile: 10
file content (67 lines) | stat: -rw-r--r-- 2,061 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#ifndef _INCLUDE_GUARD_PROTOTYPES_H_
#define _INCLUDE_GUARD_PROTOTYPES_H_

/*
   Copyright (C) 2003 Red Hat, Inc. All rights reserved.
                                                                                                             
   Usage and distribution of this file are subject to the Open Software License version 2.1
   that can be found at http://www.opensource.org/licenses/osl-2.1.txt and the COPYING file as
   distributed together with this file is included herein by reference. Alternatively you can use 
   and distribute this file under version 1.1 of the same license.
                                                                                                                      found
   Author: Arjan van de Ven   <arjanv@redhat.com>

*/


#define IRQ_OTHER 	0
#define IRQ_LEGACY 	1
#define IRQ_SCSI	2
#define IRQ_TIMER	3
#define IRQ_ETH		4
#define IRQ_GIGE	5
#define IRQ_INACTIVE	-1

#define POLICY_DEFAULT	0
#define POLICY_ROTATE	1
#define POLICY_IGNORE	2

#define MAX_CPU		32
#define MAX_INTERRUPTS  256

extern unsigned int cpubrother[];
extern unsigned int class_policy[];

struct irqdescriptor;
struct irqdescriptor {
	struct irqdescriptor *next; 	/* for putting on lists */
	int donttouch;			/* special irq, like irq0 and ide */
	
	unsigned long long oldcount;		/* total irq count on the previous check */
	unsigned long long count;		/* new irq count */
	unsigned long delta;		/* the difference */
	
	unsigned int oldcpu;		/* current coded cpu */
	unsigned int cpu;		/* future cpu; MAX_CPU is none */
	
	int type;			/* one of the IRQ_ defines */	
	int number;			/* number of the irq */
};

extern struct irqdescriptor interrupts[];
extern int cpucount;
extern int machineneedsbalance;

extern int rotate_premium;


extern int parse_proc_cpuinfo(void);
extern int parse_proc_interrupts(int incremental);
extern void classify_type(int irqnumber, char *moduletext);

extern void activate_irqtable(void);
extern int get_current_irqcpu(int irq);
extern void balance_policy(void);
extern void dump_settings(void);

#endif