source: branches/minix3-book/kernel/proto.h@ 9

Last change on this file since 9 was 4, checked in by Mattia Monga, 14 years ago

Importazione sorgenti libro

File size: 5.7 KB
RevLine 
[4]1/* Function prototypes. */
2
3#ifndef PROTO_H
4#define PROTO_H
5
6/* Struct declarations. */
7struct proc;
8struct timer;
9
10/* clock.c */
11_PROTOTYPE( void clock_task, (void) );
12_PROTOTYPE( void clock_stop, (void) );
13_PROTOTYPE( clock_t get_uptime, (void) );
14_PROTOTYPE( unsigned long read_clock, (void) );
15_PROTOTYPE( void set_timer, (struct timer *tp, clock_t t, tmr_func_t f) );
16_PROTOTYPE( void reset_timer, (struct timer *tp) );
17
18/* main.c */
19_PROTOTYPE( void main, (void) );
20_PROTOTYPE( void prepare_shutdown, (int how) );
21
22/* utility.c */
23_PROTOTYPE( void kprintf, (const char *fmt, ...) );
24_PROTOTYPE( void panic, (_CONST char *s, int n) );
25
26/* proc.c */
27_PROTOTYPE( int sys_call, (int function, int src_dest, message *m_ptr) );
28_PROTOTYPE( int lock_notify, (int src, int dst) );
29_PROTOTYPE( int lock_send, (int dst, message *m_ptr) );
30_PROTOTYPE( void lock_enqueue, (struct proc *rp) );
31_PROTOTYPE( void lock_dequeue, (struct proc *rp) );
32
33/* start.c */
34_PROTOTYPE( void cstart, (U16_t cs, U16_t ds, U16_t mds,
35 U16_t parmoff, U16_t parmsize) );
36
37/* system.c */
38_PROTOTYPE( int get_priv, (register struct proc *rc, int proc_type) );
39_PROTOTYPE( void send_sig, (int proc_nr, int sig_nr) );
40_PROTOTYPE( void cause_sig, (int proc_nr, int sig_nr) );
41_PROTOTYPE( void sys_task, (void) );
42_PROTOTYPE( void get_randomness, (int source) );
43_PROTOTYPE( int virtual_copy, (struct vir_addr *src, struct vir_addr *dst,
44 vir_bytes bytes) );
45#define numap_local(proc_nr, vir_addr, bytes) \
46 umap_local(proc_addr(proc_nr), D, (vir_addr), (bytes))
47_PROTOTYPE( phys_bytes umap_local, (struct proc *rp, int seg,
48 vir_bytes vir_addr, vir_bytes bytes) );
49_PROTOTYPE( phys_bytes umap_remote, (struct proc *rp, int seg,
50 vir_bytes vir_addr, vir_bytes bytes) );
51_PROTOTYPE( phys_bytes umap_bios, (struct proc *rp, vir_bytes vir_addr,
52 vir_bytes bytes) );
53
54/* exception.c */
55_PROTOTYPE( void exception, (unsigned vec_nr) );
56
57/* i8259.c */
58_PROTOTYPE( void intr_init, (int mine) );
59_PROTOTYPE( void intr_handle, (irq_hook_t *hook) );
60_PROTOTYPE( void put_irq_handler, (irq_hook_t *hook, int irq,
61 irq_handler_t handler) );
62_PROTOTYPE( void rm_irq_handler, (irq_hook_t *hook) );
63
64/* klib*.s */
65_PROTOTYPE( void int86, (void) );
66_PROTOTYPE( void cp_mess, (int src,phys_clicks src_clicks,vir_bytes src_offset,
67 phys_clicks dst_clicks, vir_bytes dst_offset) );
68_PROTOTYPE( void enable_irq, (irq_hook_t *hook) );
69_PROTOTYPE( int disable_irq, (irq_hook_t *hook) );
70_PROTOTYPE( u16_t mem_rdw, (U16_t segm, vir_bytes offset) );
71_PROTOTYPE( void phys_copy, (phys_bytes source, phys_bytes dest,
72 phys_bytes count) );
73_PROTOTYPE( void phys_memset, (phys_bytes source, unsigned long pattern,
74 phys_bytes count) );
75_PROTOTYPE( void phys_insb, (U16_t port, phys_bytes buf, size_t count) );
76_PROTOTYPE( void phys_insw, (U16_t port, phys_bytes buf, size_t count) );
77_PROTOTYPE( void phys_outsb, (U16_t port, phys_bytes buf, size_t count) );
78_PROTOTYPE( void phys_outsw, (U16_t port, phys_bytes buf, size_t count) );
79_PROTOTYPE( void reset, (void) );
80_PROTOTYPE( void level0, (void (*func)(void)) );
81_PROTOTYPE( void monitor, (void) );
82_PROTOTYPE( void read_tsc, (unsigned long *high, unsigned long *low) );
83_PROTOTYPE( unsigned long read_cpu_flags, (void) );
84
85/* mpx*.s */
86_PROTOTYPE( void idle_task, (void) );
87_PROTOTYPE( void restart, (void) );
88
89/* The following are never called from C (pure asm procs). */
90
91/* Exception handlers (real or protected mode), in numerical order. */
92void _PROTOTYPE( int00, (void) ), _PROTOTYPE( divide_error, (void) );
93void _PROTOTYPE( int01, (void) ), _PROTOTYPE( single_step_exception, (void) );
94void _PROTOTYPE( int02, (void) ), _PROTOTYPE( nmi, (void) );
95void _PROTOTYPE( int03, (void) ), _PROTOTYPE( breakpoint_exception, (void) );
96void _PROTOTYPE( int04, (void) ), _PROTOTYPE( overflow, (void) );
97void _PROTOTYPE( int05, (void) ), _PROTOTYPE( bounds_check, (void) );
98void _PROTOTYPE( int06, (void) ), _PROTOTYPE( inval_opcode, (void) );
99void _PROTOTYPE( int07, (void) ), _PROTOTYPE( copr_not_available, (void) );
100void _PROTOTYPE( double_fault, (void) );
101void _PROTOTYPE( copr_seg_overrun, (void) );
102void _PROTOTYPE( inval_tss, (void) );
103void _PROTOTYPE( segment_not_present, (void) );
104void _PROTOTYPE( stack_exception, (void) );
105void _PROTOTYPE( general_protection, (void) );
106void _PROTOTYPE( page_fault, (void) );
107void _PROTOTYPE( copr_error, (void) );
108
109/* Hardware interrupt handlers. */
110_PROTOTYPE( void hwint00, (void) );
111_PROTOTYPE( void hwint01, (void) );
112_PROTOTYPE( void hwint02, (void) );
113_PROTOTYPE( void hwint03, (void) );
114_PROTOTYPE( void hwint04, (void) );
115_PROTOTYPE( void hwint05, (void) );
116_PROTOTYPE( void hwint06, (void) );
117_PROTOTYPE( void hwint07, (void) );
118_PROTOTYPE( void hwint08, (void) );
119_PROTOTYPE( void hwint09, (void) );
120_PROTOTYPE( void hwint10, (void) );
121_PROTOTYPE( void hwint11, (void) );
122_PROTOTYPE( void hwint12, (void) );
123_PROTOTYPE( void hwint13, (void) );
124_PROTOTYPE( void hwint14, (void) );
125_PROTOTYPE( void hwint15, (void) );
126
127/* Software interrupt handlers, in numerical order. */
128_PROTOTYPE( void trp, (void) );
129_PROTOTYPE( void s_call, (void) ), _PROTOTYPE( p_s_call, (void) );
130_PROTOTYPE( void level0_call, (void) );
131
132/* protect.c */
133_PROTOTYPE( void prot_init, (void) );
134_PROTOTYPE( void init_codeseg, (struct segdesc_s *segdp, phys_bytes base,
135 vir_bytes size, int privilege) );
136_PROTOTYPE( void init_dataseg, (struct segdesc_s *segdp, phys_bytes base,
137 vir_bytes size, int privilege) );
138_PROTOTYPE( phys_bytes seg2phys, (U16_t seg) );
139_PROTOTYPE( void phys2seg, (u16_t *seg, vir_bytes *off, phys_bytes phys));
140_PROTOTYPE( void enable_iop, (struct proc *pp) );
141_PROTOTYPE( void alloc_segments, (struct proc *rp) );
142
143#endif /* PROTO_H */
144
145
Note: See TracBrowser for help on using the repository browser.