source: trunk/minix/kernel/proto.h@ 12

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

Minix 3.1.2a

File size: 6.5 KB
RevLine 
[9]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( int kprintf, (const char *fmt, ...) );
24_PROTOTYPE( void panic, (_CONST char *s, int n) );
25
26/* proc.c */
27_PROTOTYPE( int sys_call, (int call_nr, int src_dst,
28 message *m_ptr, long bit_map) );
29_PROTOTYPE( int lock_notify, (int src, int dst) );
30_PROTOTYPE( int lock_send, (int dst, message *m_ptr) );
31_PROTOTYPE( void lock_enqueue, (struct proc *rp) );
32_PROTOTYPE( void lock_dequeue, (struct proc *rp) );
33_PROTOTYPE( void balance_queues, (struct timer *tp) );
34#if DEBUG_ENABLE_IPC_WARNINGS
35_PROTOTYPE( int isokendpt_f, (char *file, int line, int e, int *p, int f));
36#define isokendpt_d(e, p, f) isokendpt_f(__FILE__, __LINE__, (e), (p), (f))
37#else
38_PROTOTYPE( int isokendpt_f, (int e, int *p, int f) );
39#define isokendpt_d(e, p, f) isokendpt_f((e), (p), (f))
40#endif
41
42/* start.c */
43_PROTOTYPE( void cstart, (U16_t cs, U16_t ds, U16_t mds,
44 U16_t parmoff, U16_t parmsize) );
45
46/* system.c */
47_PROTOTYPE( int get_priv, (register struct proc *rc, int proc_type) );
48_PROTOTYPE( void send_sig, (int proc_nr, int sig_nr) );
49_PROTOTYPE( void cause_sig, (int proc_nr, int sig_nr) );
50_PROTOTYPE( void sys_task, (void) );
51_PROTOTYPE( void get_randomness, (int source) );
52_PROTOTYPE( int virtual_copy, (struct vir_addr *src, struct vir_addr *dst,
53 vir_bytes bytes) );
54#define numap_local(proc_nr, vir_addr, bytes) \
55 umap_local(proc_addr(proc_nr), D, (vir_addr), (bytes))
56_PROTOTYPE( phys_bytes umap_local, (struct proc *rp, int seg,
57 vir_bytes vir_addr, vir_bytes bytes) );
58_PROTOTYPE( phys_bytes umap_remote, (struct proc *rp, int seg,
59 vir_bytes vir_addr, vir_bytes bytes) );
60_PROTOTYPE( phys_bytes umap_bios, (struct proc *rp, vir_bytes vir_addr,
61 vir_bytes bytes) );
62_PROTOTYPE( void clear_endpoint, (struct proc *rc) );
63
64#if (CHIP == INTEL)
65
66/* exception.c */
67_PROTOTYPE( void exception, (unsigned vec_nr) );
68
69/* i8259.c */
70_PROTOTYPE( void intr_init, (int mine) );
71_PROTOTYPE( void intr_handle, (irq_hook_t *hook) );
72_PROTOTYPE( void put_irq_handler, (irq_hook_t *hook, int irq,
73 irq_handler_t handler) );
74_PROTOTYPE( void rm_irq_handler, (irq_hook_t *hook) );
75
76/* klib*.s */
77_PROTOTYPE( void int86, (void) );
78_PROTOTYPE( void cp_mess, (int src,phys_clicks src_clicks,vir_bytes src_offset,
79 phys_clicks dst_clicks, vir_bytes dst_offset) );
80_PROTOTYPE( void enable_irq, (irq_hook_t *hook) );
81_PROTOTYPE( int disable_irq, (irq_hook_t *hook) );
82_PROTOTYPE( u16_t mem_rdw, (U16_t segm, vir_bytes offset) );
83_PROTOTYPE( void phys_copy, (phys_bytes source, phys_bytes dest,
84 phys_bytes count) );
85_PROTOTYPE( void phys_memset, (phys_bytes source, unsigned long pattern,
86 phys_bytes count) );
87_PROTOTYPE( void phys_insb, (U16_t port, phys_bytes buf, size_t count) );
88_PROTOTYPE( void phys_insw, (U16_t port, phys_bytes buf, size_t count) );
89_PROTOTYPE( void phys_outsb, (U16_t port, phys_bytes buf, size_t count) );
90_PROTOTYPE( void phys_outsw, (U16_t port, phys_bytes buf, size_t count) );
91_PROTOTYPE( void reset, (void) );
92_PROTOTYPE( void level0, (void (*func)(void)) );
93_PROTOTYPE( void monitor, (void) );
94_PROTOTYPE( void read_tsc, (unsigned long *high, unsigned long *low) );
95_PROTOTYPE( unsigned long read_cr0, (void) );
96_PROTOTYPE( void write_cr0, (unsigned long value) );
97_PROTOTYPE( void write_cr3, (unsigned long value) );
98_PROTOTYPE( unsigned long read_cpu_flags, (void) );
99
100/* mpx*.s */
101_PROTOTYPE( void idle_task, (void) );
102_PROTOTYPE( void restart, (void) );
103
104/* The following are never called from C (pure asm procs). */
105
106/* Exception handlers (real or protected mode), in numerical order. */
107void _PROTOTYPE( int00, (void) ), _PROTOTYPE( divide_error, (void) );
108void _PROTOTYPE( int01, (void) ), _PROTOTYPE( single_step_exception, (void) );
109void _PROTOTYPE( int02, (void) ), _PROTOTYPE( nmi, (void) );
110void _PROTOTYPE( int03, (void) ), _PROTOTYPE( breakpoint_exception, (void) );
111void _PROTOTYPE( int04, (void) ), _PROTOTYPE( overflow, (void) );
112void _PROTOTYPE( int05, (void) ), _PROTOTYPE( bounds_check, (void) );
113void _PROTOTYPE( int06, (void) ), _PROTOTYPE( inval_opcode, (void) );
114void _PROTOTYPE( int07, (void) ), _PROTOTYPE( copr_not_available, (void) );
115void _PROTOTYPE( double_fault, (void) );
116void _PROTOTYPE( copr_seg_overrun, (void) );
117void _PROTOTYPE( inval_tss, (void) );
118void _PROTOTYPE( segment_not_present, (void) );
119void _PROTOTYPE( stack_exception, (void) );
120void _PROTOTYPE( general_protection, (void) );
121void _PROTOTYPE( page_fault, (void) );
122void _PROTOTYPE( copr_error, (void) );
123
124/* Hardware interrupt handlers. */
125_PROTOTYPE( void hwint00, (void) );
126_PROTOTYPE( void hwint01, (void) );
127_PROTOTYPE( void hwint02, (void) );
128_PROTOTYPE( void hwint03, (void) );
129_PROTOTYPE( void hwint04, (void) );
130_PROTOTYPE( void hwint05, (void) );
131_PROTOTYPE( void hwint06, (void) );
132_PROTOTYPE( void hwint07, (void) );
133_PROTOTYPE( void hwint08, (void) );
134_PROTOTYPE( void hwint09, (void) );
135_PROTOTYPE( void hwint10, (void) );
136_PROTOTYPE( void hwint11, (void) );
137_PROTOTYPE( void hwint12, (void) );
138_PROTOTYPE( void hwint13, (void) );
139_PROTOTYPE( void hwint14, (void) );
140_PROTOTYPE( void hwint15, (void) );
141
142/* Software interrupt handlers, in numerical order. */
143_PROTOTYPE( void trp, (void) );
144_PROTOTYPE( void s_call, (void) ), _PROTOTYPE( p_s_call, (void) );
145_PROTOTYPE( void level0_call, (void) );
146
147/* protect.c */
148_PROTOTYPE( void prot_init, (void) );
149_PROTOTYPE( void init_codeseg, (struct segdesc_s *segdp, phys_bytes base,
150 vir_bytes size, int privilege) );
151_PROTOTYPE( void init_dataseg, (struct segdesc_s *segdp, phys_bytes base,
152 vir_bytes size, int privilege) );
153_PROTOTYPE( phys_bytes seg2phys, (U16_t seg) );
154_PROTOTYPE( void phys2seg, (u16_t *seg, vir_bytes *off, phys_bytes phys));
155_PROTOTYPE( void enable_iop, (struct proc *pp) );
156_PROTOTYPE( void alloc_segments, (struct proc *rp) );
157
158/* system/do_vm.c */
159_PROTOTYPE( void vm_map_default, (struct proc *pp) );
160
161#endif /* (CHIP == INTEL) */
162
163#if (CHIP == M68000)
164/* M68000 specific prototypes go here. */
165#endif /* (CHIP == M68000) */
166
167#endif /* PROTO_H */
Note: See TracBrowser for help on using the repository browser.