/[dynamips]/trunk/utils.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

Diff of /trunk/utils.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

upstream/dynamips-0.2.7/utils.h revision 10 by dpavlin, Sat Oct 6 16:29:14 2007 UTC upstream/dynamips-0.2.8-RC1/utils.h revision 11 by dpavlin, Sat Oct 6 16:33:40 2007 UTC
# Line 12  Line 12 
12  #include <sys/time.h>  #include <sys/time.h>
13  #include <time.h>  #include <time.h>
14  #include <netinet/in.h>  #include <netinet/in.h>
15    #include <pthread.h>
16    #include <signal.h>
17    
18  /* True/False definitions */  /* True/False definitions */
19  #ifndef FALSE  #ifndef FALSE
# Line 50  Line 52 
52  #define ARCH_BYTE_ORDER ARCH_LITTLE_ENDIAN  #define ARCH_BYTE_ORDER ARCH_LITTLE_ENDIAN
53  #elif defined(__x86_64__)  #elif defined(__x86_64__)
54  #define ARCH_BYTE_ORDER ARCH_LITTLE_ENDIAN  #define ARCH_BYTE_ORDER ARCH_LITTLE_ENDIAN
55    #elif defined(__ia64__)
56    #define ARCH_BYTE_ORDER ARCH_LITTLE_ENDIAN
57  #endif  #endif
58    
59  #ifndef ARCH_BYTE_ORDER  #ifndef ARCH_BYTE_ORDER
# Line 89  Line 93 
93    
94  #if __GNUC__ > 2  #if __GNUC__ > 2
95  /* http://kerneltrap.org/node/4705 */  /* http://kerneltrap.org/node/4705 */
96  #define likely(x)    __builtin_expect((x),1)  #define likely(x)    __builtin_expect(!!(x),1)
97  #define unlikely(x)  __builtin_expect((x),0)  #define unlikely(x)  __builtin_expect((x),0)
98  #else  #else
99  #define likely(x)    (x)  #define likely(x)    (x)
# Line 115  typedef m_uint64_t m_tmcnt_t; Line 119  typedef m_uint64_t m_tmcnt_t;
119  /* Forward declarations */  /* Forward declarations */
120  typedef struct cpu_gen cpu_gen_t;  typedef struct cpu_gen cpu_gen_t;
121  typedef struct vm_instance vm_instance_t;  typedef struct vm_instance vm_instance_t;
122    typedef struct vm_platform vm_platform_t;
123  typedef struct mips64_jit_tcb mips64_jit_tcb_t;  typedef struct mips64_jit_tcb mips64_jit_tcb_t;
124  typedef struct ppc32_jit_tcb ppc32_jit_tcb_t;  typedef struct ppc32_jit_tcb ppc32_jit_tcb_t;
125  typedef struct jit_op jit_op_t;  typedef struct jit_op jit_op_t;
# Line 167  typedef struct { Line 172  typedef struct {
172     m_uint64_t len;     m_uint64_t len;
173     m_uint32_t cached;     m_uint32_t cached;
174     m_uint32_t tlb_index;     m_uint32_t tlb_index;
175       m_uint32_t offset;
176  }mts_map_t;  }mts_map_t;
177    
178  /* Invalid VTLB entry */  /* Invalid VTLB entry */
# Line 351  void m_log(char *module,char *fmt,...); Line 357  void m_log(char *module,char *fmt,...);
357  char *m_fgets(char *buffer,int size,FILE *fd);  char *m_fgets(char *buffer,int size,FILE *fd);
358    
359  /* Read a file and returns it in a buffer */  /* Read a file and returns it in a buffer */
360  ssize_t m_read_file(char *filename,char **buffer);  ssize_t m_read_file(char *filename,u_char **buffer);
361    
362  /* Allocate aligned memory */  /* Allocate aligned memory */
363  void *m_memalign(size_t boundary,size_t size);  void *m_memalign(size_t boundary,size_t size);

Legend:
Removed from v.10  
changed lines
  Added in v.11

  ViewVC Help
Powered by ViewVC 1.1.26