1 /* Function prototypes. */
6 #include <minix/safecopies.h>
9 /* Struct declarations. */
14 _PROTOTYPE( void clock_task
, (void) );
15 _PROTOTYPE( clock_t get_uptime
, (void) );
16 _PROTOTYPE( void set_timer
, (struct timer
*tp
, clock_t t
, tmr_func_t f
) );
17 _PROTOTYPE( void reset_timer
, (struct timer
*tp
) );
20 _PROTOTYPE( void main
, (void) );
21 _PROTOTYPE( void prepare_shutdown
, (int how
) );
22 _PROTOTYPE( void idle_task
, (void) );
25 _PROTOTYPE( int kprintf
, (const char *fmt
, ...) );
26 _PROTOTYPE( void panic
, (_CONST
char *s
, int n
) );
29 _PROTOTYPE( int sys_call
, (int call_nr
, int src_dst
,
30 message
*m_ptr
, long bit_map
) );
31 _PROTOTYPE( int lock_notify
, (int src
, int dst
) );
32 _PROTOTYPE( int lock_send
, (int dst
, message
*m_ptr
) );
33 _PROTOTYPE( void lock_enqueue
, (struct proc
*rp
) );
34 _PROTOTYPE( void lock_dequeue
, (struct proc
*rp
) );
35 _PROTOTYPE( void balance_queues
, (struct timer
*tp
) );
36 #if DEBUG_ENABLE_IPC_WARNINGS
37 _PROTOTYPE( int isokendpt_f
, (char *file
, int line
, endpoint_t e
, int *p
, int f
));
38 #define isokendpt_d(e, p, f) isokendpt_f(__FILE__, __LINE__, (e), (p), (f))
40 _PROTOTYPE( int isokendpt_f
, (endpoint_t e
, int *p
, int f
) );
41 #define isokendpt_d(e, p, f) isokendpt_f((e), (p), (f))
45 _PROTOTYPE( void cstart
, (U16_t cs
, U16_t ds
, U16_t mds
,
46 U16_t parmoff
, U16_t parmsize
) );
49 _PROTOTYPE( int get_priv
, (register struct proc
*rc
, int proc_type
) );
50 _PROTOTYPE( void send_sig
, (int proc_nr
, int sig_nr
) );
51 _PROTOTYPE( void cause_sig
, (int proc_nr
, int sig_nr
) );
52 _PROTOTYPE( void sys_task
, (void) );
53 _PROTOTYPE( void get_randomness
, (int source
) );
54 _PROTOTYPE( int virtual_copy
, (struct vir_addr
*src
, struct vir_addr
*dst
,
56 #define numap_local(proc_nr, vir_addr, bytes) \
57 umap_local(proc_addr(proc_nr), D, (vir_addr), (bytes))
58 _PROTOTYPE( phys_bytes umap_grant
, (struct proc
*, cp_grant_id_t
,
60 _PROTOTYPE( phys_bytes umap_verify_grant
, (struct proc
*, endpoint_t
,
61 cp_grant_id_t
, vir_bytes
, vir_bytes
, int));
62 _PROTOTYPE( void clear_endpoint
, (struct proc
*rc
) );
63 _PROTOTYPE( phys_bytes umap_bios
, (struct proc
*rp
, vir_bytes vir_addr
,
66 /* system/do_newmap.c */
67 _PROTOTYPE( int newmap
, (struct proc
*rp
, struct mem_map
*map_ptr
) );
70 _PROTOTYPE( void intr_handle
, (irq_hook_t
*hook
) );
71 _PROTOTYPE( void put_irq_handler
, (irq_hook_t
*hook
, int irq
,
72 irq_handler_t handler
) );
73 _PROTOTYPE( void rm_irq_handler
, (irq_hook_t
*hook
) );
74 _PROTOTYPE( void enable_irq
, (irq_hook_t
*hook
) );
75 _PROTOTYPE( int disable_irq
, (irq_hook_t
*hook
) );
79 _PROTOTYPE( void check_runqueues
, (char *when
) );
83 _PROTOTYPE( void vm_map_default
, (struct proc
*pp
) );
85 /* system/do_safecopy.c */
86 _PROTOTYPE( int verify_grant
, (endpoint_t
, endpoint_t
, cp_grant_id_t
, vir_bytes
,
87 int, vir_bytes
, vir_bytes
*, endpoint_t
*));
91 _PROTOTYPE( void init_profile_clock
, (u32_t
) );
92 _PROTOTYPE( void stop_profile_clock
, (void) );
95 /* functions defined in architecture-dependent files. */
96 _PROTOTYPE( void phys_copy
, (phys_bytes source
, phys_bytes dest
,
98 _PROTOTYPE( void alloc_segments
, (struct proc
*rp
) );
99 _PROTOTYPE( void vm_init
, (void) );
100 _PROTOTYPE( void vm_map_range
, (u32_t base
, u32_t size
, u32_t offset
) );
101 _PROTOTYPE( phys_bytes umap_local
, (register struct proc
*rp
, int seg
,
102 vir_bytes vir_addr
, vir_bytes bytes
));
103 _PROTOTYPE( void cp_mess
, (int src
,phys_clicks src_clicks
,
104 vir_bytes src_offset
, phys_clicks dst_clicks
, vir_bytes dst_offset
));
105 _PROTOTYPE( phys_bytes umap_remote
, (struct proc
* rp
, int seg
,
106 vir_bytes vir_addr
, vir_bytes bytes
) );
107 _PROTOTYPE( phys_bytes seg2phys
, (U16_t
) );
108 _PROTOTYPE( void phys_memset
, (phys_bytes source
, unsigned long pattern
,
110 _PROTOTYPE( vir_bytes alloc_remote_segment
, (u32_t
*, segframe_t
*,
111 int, phys_bytes
, vir_bytes
, int));
112 _PROTOTYPE( int arch_init_clock
, (void) );
113 _PROTOTYPE( clock_t read_clock
, (void) );
114 _PROTOTYPE( void clock_stop
, (void) );
115 _PROTOTYPE( int intr_init
, (int) );
116 _PROTOTYPE( int intr_disabled
, (void) );
117 _PROTOTYPE( int intr_unmask
, (irq_hook_t
* hook
) );
118 _PROTOTYPE( int intr_mask
, (irq_hook_t
* hook
) );
119 _PROTOTYPE( void idle_task
, (void) );
120 _PROTOTYPE( void system_init
, (void) );
121 _PROTOTYPE( void ser_putc
, (char) );
122 _PROTOTYPE( void arch_shutdown
, (int) );
123 _PROTOTYPE( void restart
, (void) );
124 _PROTOTYPE( void idle_task
, (void) );
125 _PROTOTYPE( void read_tsc
, (unsigned long *high
, unsigned long *low
) );
126 _PROTOTYPE( int arch_init_profile_clock
, (u32_t freq
) );
127 _PROTOTYPE( void arch_stop_profile_clock
, (void) );
128 _PROTOTYPE( void arch_ack_profile_clock
, (void) );