Remove EVENT_JUSTHANDLEIT (XCC)
[akaros.git] / kern / include / ros / ucq.h
index 11e9fd5..940b37e 100644 (file)
 #define ROS_INC_UCQ_H
 
 #include <ros/common.h>
-#include <ros/event.h>
 #include <ros/atomic.h>
 #include <ros/arch/mmu.h>
 
+#ifdef ROS_KERNEL
+#include <arch/arch.h>
+#else
+#include <parlib/arch/arch.h>
+#endif
+
+/* #include <ros/event.h> included below */
+
 /* The main UCQ structure, contains indexes and start points (for the indexes),
  * etc. */
 struct ucq {
@@ -33,7 +40,7 @@ struct ucq {
        atomic_t                                        cons_idx;               /* cons pg and slot nr */
        bool                                            ucq_ready;              /* ucq is ready to be used */
        /* Userspace lock for modifying the UCQ */
-       uint64_t                                        u_lock;
+       uint64_t                                        u_lock[2 * ARCH_CL_SIZE / 8];
 };
 
 /* Struct at the beginning of every page/buffer, tracking consumers and
@@ -43,6 +50,9 @@ struct ucq_page_header {
        atomic_t                                        nr_cons;                /* like an inverted refcnt */
 };
 
+/* Including here since event.h needs to know about struct ucq */
+#include <ros/event.h>
+
 struct msg_container {
        struct event_msg                        ev_msg;
        bool                                            ready;                  /* kernel has written */