BNX2X: limit queues to 2
[akaros.git] / kern / include / ros / event.h
index 02c42bb..44327af 100644 (file)
@@ -9,7 +9,7 @@
 
 #include <ros/common.h>
 #include <ros/atomic.h>
-#include <ros/arch/trapframe.h>
+#include <ros/trapframe.h>
 /* #include <ros/ucq.h> included below */
 
 /* Event Delivery Flags from the process to the kernel */
@@ -105,13 +105,18 @@ struct event_queue_big {
 #define VC_UTHREAD_STEALING            0x008                           /* Uthread being stolen */
 #define VC_SCP_NOVCCTX                 0x010                           /* can't go into vc ctx */
 
+/* Racy flags, where we don't need the atomics */
+#define VC_FPU_SAVED                   0x1000                          /* valid FPU state in anc */
+
 /* Per-core data about preemptions and notifications */
 struct preempt_data {
-       struct user_trapframe           preempt_tf;                     /* slot for vcore ctx */
+       struct user_context                     vcore_ctx;                      /* for preemptions */
        struct ancillary_state          preempt_anc;
-       struct user_trapframe           notif_tf;                       /* slot for uthread ctx */
+       struct user_context                     uthread_ctx;            /* for preempts or notifs */
        uintptr_t                                       transition_stack;       /* advertised by the user */
+       uintptr_t                                       vcore_tls_desc;         /* advertised by the user */
        atomic_t                                        flags;
+       int                                                     rflags;                         /* racy flags */
        bool                                            notif_disabled;         /* vcore unwilling to recv*/
        bool                                            notif_pending;          /* notif k_msg on the way */
        struct event_mbox                       ev_mbox_public;         /* can be read remotely */