BNX2X: limit queues to 2
[akaros.git] / kern / include / ros / event.h
index ecec750..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 */
@@ -46,7 +46,8 @@
 #define EV_FREE_APPLE_PIE               9
 #define EV_SYSCALL                             10
 #define EV_CHECK_MSGS                  11
-#define NR_EVENT_TYPES                 12 /* keep me last */
+#define EV_POSIX_SIGNAL                        12
+#define NR_EVENT_TYPES                 25 /* keep me last (and 1 > the last one) */
 
 /* Will probably have dynamic notifications later */
 #define MAX_NR_DYN_EVENT               25
@@ -104,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 */