X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Futil.h;h=44545d412f1db9a8353cc4f9c9c1112d29beae75;hb=1ee73f3c18d424d7f1f0f36aa1f3ca06337a9d9c;hp=7f418a9485c023364d4f05993e4b6ad35a8030e1;hpb=86ea36402d2ba296db0950d85e18c50f7ee7006b;p=retroray
diff --git a/src/util.h b/src/util.h
index 7f418a9..44545d4 100644
--- a/src/util.h
+++ b/src/util.h
@@ -27,6 +27,19 @@ along with this program. If not, see .
#include
#endif
+#ifdef __GNUC__
+#define PACKED __attribute__((packed))
+#else
+#define PACKED
+#endif
+
+unsigned int get_cs(void);
+#define get_cpl() ((int)(get_cs() & 3))
+
+void get_msr(uint32_t msr, uint32_t *low, uint32_t *high);
+void set_msr(uint32_t msr, uint32_t low, uint32_t high);
+
+
/* Non-failing versions of malloc/calloc/realloc. They never return 0, they call
* demo_abort on failure. Use the macros, don't call the *_impl functions.
*/