/[dynamips]/upstream/dynamips-0.2.6-RC2/cpu.h
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /upstream/dynamips-0.2.6-RC2/cpu.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3 - (hide annotations)
Sat Oct 6 16:05:34 2007 UTC (16 years, 5 months ago) by dpavlin
File MIME type: text/plain
File size: 1725 byte(s)
dynamips-0.2.6-RC2

1 dpavlin 1 /*
2     * Cisco 7200 (Predator) simulation platform.
3     * Copyright (c) 2005,2006 Christophe Fillot (cf@utc.fr)
4     */
5    
6     #ifndef __CPU_H__
7     #define __CPU_H__
8    
9     #include "mips64.h"
10    
11     /* CPU group definition */
12     typedef struct cpu_group cpu_group_t;
13     struct cpu_group {
14     char *name;
15     cpu_mips_t *cpu_list;
16     void *priv_data;
17     };
18    
19     /* Find a CPU in a group given its ID */
20     cpu_mips_t *cpu_group_find_id(cpu_group_t *group,u_int id);
21    
22     /* Find the highest CPU ID in a CPU group */
23     int cpu_group_find_highest_id(cpu_group_t *group,u_int *highest_id);
24    
25     /* Add a CPU in a CPU group */
26     int cpu_group_add(cpu_group_t *group,cpu_mips_t *cpu);
27    
28     /* Create a new CPU group */
29     cpu_group_t *cpu_group_create(char *name);
30    
31     /* Delete a CPU group */
32     void cpu_group_delete(cpu_group_t *group);
33    
34     /* Rebuild the MTS subsystem for a CPU group */
35     int cpu_group_rebuild_mts(cpu_group_t *group);
36    
37     /* Log a message for a CPU */
38     void cpu_log(cpu_mips_t *cpu,char *module,char *format,...);
39    
40     /* Create a new CPU */
41     cpu_mips_t *cpu_create(vm_instance_t *vm,u_int id);
42    
43     /* Delete a CPU */
44     void cpu_delete(cpu_mips_t *cpu);
45    
46     /* Start a CPU */
47     void cpu_start(cpu_mips_t *cpu);
48    
49     /* Stop a CPU */
50     void cpu_stop(cpu_mips_t *cpu);
51    
52     /* Start all CPUs of a CPU group */
53     void cpu_group_start_all_cpu(cpu_group_t *group);
54    
55     /* Stop all CPUs of a CPU group */
56     void cpu_group_stop_all_cpu(cpu_group_t *group);
57    
58     /* Set a state of all CPUs of a CPU group */
59     void cpu_group_set_state(cpu_group_t *group,u_int state);
60    
61     /* Synchronize on CPUs (all CPUs must be inactive) */
62     int cpu_group_sync_state(cpu_group_t *group);
63    
64     /* Save state of all CPUs */
65     int cpu_group_save_state(cpu_group_t *group);
66    
67     /* Restore state of all CPUs */
68     int cpu_group_restore_state(cpu_group_t *group);
69    
70     #endif

  ViewVC Help
Powered by ViewVC 1.1.26