#ifdef __V3VEE__
+#include <palacios/vmm_lock.h>
+#include <palacios/vmm_bitmap.h>
+
-#include <util/vmm_lock.h>
struct v3_barrier {
- uint64_t cpus;
int active; // If 1, barrier is active, everyone must wait
// If 0, barrier is clear, can proceed
+ struct v3_bitmap cpu_map;
+
v3_lock_t lock;
};
+struct v3_vm_info;
+struct guest_info;
+
+int v3_init_barrier(struct v3_vm_info * vm_info);
+int v3_deinit_barrier(struct v3_vm_info * vm_info);
+
-int v3_init_barrier(struct v3_barrier * barrier);
+int v3_raise_barrier(struct v3_vm_info * vm_info, struct guest_info * local_core);
+int v3_lower_barrier(struct v3_vm_info * vm_info);
+
+int v3_wait_at_barrier(struct guest_info * core);
+
+
+/* Special Barrier activation functions.
+ * DO NOT USE THESE UNLESS YOU KNOW WHAT YOU ARE DOING
+ */
+int v3_raise_barrier_nowait(struct v3_vm_info * vm_info, struct guest_info * local_core);
+int v3_wait_for_barrier(struct v3_vm_info * vm_info, struct guest_info * local_core);
+/* ** */
-int v3_activate_barrier(struct guest_info * core);
-int v3_check_barrier(struct guest_info * core);
#endif