linux-user: Support f_flags in statfs64 when available.
[qemu/ar7.git] / include / sysemu / cpus.h
blob231685955db523482c649afe20be06e6ff8d9922
1 #ifndef QEMU_CPUS_H
2 #define QEMU_CPUS_H
4 #include "qemu/timer.h"
6 /* cpus.c */
8 /* CPU execution threads */
10 typedef struct CpusAccel {
11 void (*create_vcpu_thread)(CPUState *cpu); /* MANDATORY */
12 void (*kick_vcpu_thread)(CPUState *cpu);
14 void (*synchronize_post_reset)(CPUState *cpu);
15 void (*synchronize_post_init)(CPUState *cpu);
16 void (*synchronize_state)(CPUState *cpu);
17 void (*synchronize_pre_loadvm)(CPUState *cpu);
19 void (*handle_interrupt)(CPUState *cpu, int mask);
21 int64_t (*get_virtual_clock)(void);
22 int64_t (*get_elapsed_ticks)(void);
23 } CpusAccel;
25 /* register accel-specific cpus interface implementation */
26 void cpus_register_accel(const CpusAccel *i);
28 /* interface available for cpus accelerator threads */
30 /* For temporary buffers for forming a name */
31 #define VCPU_THREAD_NAME_SIZE 16
33 void cpus_kick_thread(CPUState *cpu);
34 bool cpu_work_list_empty(CPUState *cpu);
35 bool cpu_thread_is_idle(CPUState *cpu);
36 bool all_cpu_threads_idle(void);
37 bool cpu_can_run(CPUState *cpu);
38 void qemu_wait_io_event_common(CPUState *cpu);
39 void qemu_wait_io_event(CPUState *cpu);
40 void cpu_thread_signal_created(CPUState *cpu);
41 void cpu_thread_signal_destroyed(CPUState *cpu);
42 void cpu_handle_guest_debug(CPUState *cpu);
44 /* end interface for cpus accelerator threads */
46 bool qemu_in_vcpu_thread(void);
47 void qemu_init_cpu_loop(void);
48 void resume_all_vcpus(void);
49 void pause_all_vcpus(void);
50 void cpu_stop_current(void);
52 extern int icount_align_option;
54 /* Unblock cpu */
55 void qemu_cpu_kick_self(void);
57 void cpu_synchronize_all_states(void);
58 void cpu_synchronize_all_post_reset(void);
59 void cpu_synchronize_all_post_init(void);
60 void cpu_synchronize_all_pre_loadvm(void);
62 #ifndef CONFIG_USER_ONLY
63 /* vl.c */
64 /* *-user doesn't have configurable SMP topology */
65 extern int smp_cores;
66 extern int smp_threads;
67 #endif
69 void list_cpus(const char *optarg);
71 #endif