summaryrefslogtreecommitdiff
path: root/src/biosvar.h
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2012-06-10 09:09:22 -0400
committerKevin O'Connor <kevin@koconnor.net>2012-06-10 09:09:22 -0400
commite51316d0cc6f663357d9d6c6f4ee3ffddb0d09e5 (patch)
tree72fa37be59edd8e2c9d65f4660559c263d6814f9 /src/biosvar.h
parent7a88c87f99bd694fc4815854056e0ac529ae905d (diff)
downloadqemu-seabios-e51316d0cc6f663357d9d6c6f4ee3ffddb0d09e5.tar.gz
Minor - remove CLEARBITS_BDA and SETBITS_BDA macros.
Remove these infrequently used macros and replace with explicit GET_BDA/SET_BDA calls. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/biosvar.h')
-rw-r--r--src/biosvar.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/biosvar.h b/src/biosvar.h
index eceee54..c879f40 100644
--- a/src/biosvar.h
+++ b/src/biosvar.h
@@ -134,14 +134,12 @@ struct bios_data_area_s {
GET_FARVAR(SEG_BDA, ((struct bios_data_area_s *)0)->var)
#define SET_BDA(var, val) \
SET_FARVAR(SEG_BDA, ((struct bios_data_area_s *)0)->var, (val))
-#define CLEARBITS_BDA(var, val) do { \
- typeof(((struct bios_data_area_s *)0)->var) __val = GET_BDA(var); \
- SET_BDA(var, (__val & ~(val))); \
- } while (0)
-#define SETBITS_BDA(var, val) do { \
- typeof(((struct bios_data_area_s *)0)->var) __val = GET_BDA(var); \
- SET_BDA(var, (__val | (val))); \
- } while (0)
+
+// Helper function to set the bits of the equipment_list_flags variable.
+static inline void set_equipment_flags(u16 clear, u16 set) {
+ u16 eqf = GET_BDA(equipment_list_flags);
+ SET_BDA(equipment_list_flags, (eqf & ~clear) | set);
+}
/****************************************************************