]> Git Repo - qemu.git/commitdiff
cpu: Introduce vaddr type
authorAndreas Färber <[email protected]>
Sat, 6 Jul 2013 01:14:52 +0000 (03:14 +0200)
committerAndreas Färber <[email protected]>
Tue, 23 Jul 2013 00:41:31 +0000 (02:41 +0200)
vaddr is to target_ulong what uintmax_t is to unsigned int.

Its purpose is to allow turning per-target functions with target_ulong
arguments into CPUClass hooks.

Suggested-by: Peter Maydell <[email protected]>
Signed-off-by: Andreas Färber <[email protected]>
include/qom/cpu.h

index dfd81a1d2f65158dc2eb710c6c75ed8cad0a30ee..829fd4554f8980f4d1ce1f272f76118ddb1a944c 100644 (file)
 
 typedef int (*WriteCoreDumpFunction)(void *buf, size_t size, void *opaque);
 
+/**
+ * vaddr:
+ * Type wide enough to contain any #target_ulong virtual address.
+ */
+typedef uint64_t vaddr;
+#define VADDR_PRId PRId64
+#define VADDR_PRIu PRIu64
+#define VADDR_PRIo PRIo64
+#define VADDR_PRIx PRIx64
+#define VADDR_PRIX PRIX64
+#define VADDR_MAX UINT64_MAX
+
 /**
  * SECTION:cpu
  * @section_id: QEMU-cpu
This page took 0.028014 seconds and 4 git commands to generate.