Linux Audio

Check our new training course

Loading...
v3.1
 1/*
 2 * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
 3 * Licensed under the GPL
 4 */
 5
 6#ifndef __KERN_UTIL_H__
 7#define __KERN_UTIL_H__
 8
 9#include "sysdep/ptrace.h"
10#include "sysdep/faultinfo.h"
11
12extern int uml_exitcode;
13
14extern int ncpus;
15extern int kmalloc_ok;
16
17#define UML_ROUND_UP(addr) \
18	((((unsigned long) addr) + PAGE_SIZE - 1) & PAGE_MASK)
19
20extern unsigned long alloc_stack(int order, int atomic);
21extern void free_stack(unsigned long stack, int order);
22
23extern int do_signal(void);
24extern void copy_sc(struct uml_pt_regs *regs, void *from);
25extern void interrupt_end(void);
26extern void relay_signal(int sig, struct uml_pt_regs *regs);
27
28extern unsigned long segv(struct faultinfo fi, unsigned long ip,
29			  int is_user, struct uml_pt_regs *regs);
30extern int handle_page_fault(unsigned long address, unsigned long ip,
31			     int is_write, int is_user, int *code_out);
32
33extern unsigned int do_IRQ(int irq, struct uml_pt_regs *regs);
34extern int smp_sigio_handler(void);
35extern void initial_thread_cb(void (*proc)(void *), void *arg);
36extern int is_syscall(unsigned long addr);
37extern void timer_handler(int sig, struct uml_pt_regs *regs);
38
39extern void timer_handler(int sig, struct uml_pt_regs *regs);
40
41extern int start_uml(void);
42extern void paging_init(void);
43
44extern void uml_cleanup(void);
45extern void do_uml_exitcalls(void);
46
47/*
48 * Are we disallowed to sleep? Used to choose between GFP_KERNEL and
49 * GFP_ATOMIC.
50 */
51extern int __cant_sleep(void);
52extern void *get_current(void);
53extern int copy_from_user_proc(void *to, void *from, int size);
54extern int cpu(void);
55extern char *uml_strdup(const char *string);
56
57extern unsigned long to_irq_stack(unsigned long *mask_out);
58extern unsigned long from_irq_stack(int nested);
59
60extern void syscall_trace(struct uml_pt_regs *regs, int entryexit);
61extern int singlestepping(void *t);
62
63extern void segv_handler(int sig, struct uml_pt_regs *regs);
64extern void bus_handler(int sig, struct uml_pt_regs *regs);
65extern void winch(int sig, struct uml_pt_regs *regs);
66extern void fatal_sigsegv(void) __attribute__ ((noreturn));
67
68
69#endif
v3.5.6
 1/*
 2 * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
 3 * Licensed under the GPL
 4 */
 5
 6#ifndef __KERN_UTIL_H__
 7#define __KERN_UTIL_H__
 8
 9#include "sysdep/ptrace.h"
10#include "sysdep/faultinfo.h"
11
12extern int uml_exitcode;
13
14extern int ncpus;
15extern int kmalloc_ok;
16
17#define UML_ROUND_UP(addr) \
18	((((unsigned long) addr) + PAGE_SIZE - 1) & PAGE_MASK)
19
20extern unsigned long alloc_stack(int order, int atomic);
21extern void free_stack(unsigned long stack, int order);
22
23extern int do_signal(void);
 
24extern void interrupt_end(void);
25extern void relay_signal(int sig, struct uml_pt_regs *regs);
26
27extern unsigned long segv(struct faultinfo fi, unsigned long ip,
28			  int is_user, struct uml_pt_regs *regs);
29extern int handle_page_fault(unsigned long address, unsigned long ip,
30			     int is_write, int is_user, int *code_out);
31
32extern unsigned int do_IRQ(int irq, struct uml_pt_regs *regs);
33extern int smp_sigio_handler(void);
34extern void initial_thread_cb(void (*proc)(void *), void *arg);
35extern int is_syscall(unsigned long addr);
36extern void timer_handler(int sig, struct uml_pt_regs *regs);
37
38extern void timer_handler(int sig, struct uml_pt_regs *regs);
39
40extern int start_uml(void);
41extern void paging_init(void);
42
43extern void uml_cleanup(void);
44extern void do_uml_exitcalls(void);
45
46/*
47 * Are we disallowed to sleep? Used to choose between GFP_KERNEL and
48 * GFP_ATOMIC.
49 */
50extern int __cant_sleep(void);
51extern int get_current_pid(void);
52extern int copy_from_user_proc(void *to, void *from, int size);
53extern int cpu(void);
54extern char *uml_strdup(const char *string);
55
56extern unsigned long to_irq_stack(unsigned long *mask_out);
57extern unsigned long from_irq_stack(int nested);
58
59extern void syscall_trace(struct uml_pt_regs *regs, int entryexit);
60extern int singlestepping(void *t);
61
62extern void segv_handler(int sig, struct uml_pt_regs *regs);
63extern void bus_handler(int sig, struct uml_pt_regs *regs);
64extern void winch(int sig, struct uml_pt_regs *regs);
65extern void fatal_sigsegv(void) __attribute__ ((noreturn));
66
67
68#endif