Remove EVENT_SPAM_FLAGS (XCC)
[akaros.git] / kern / include / ros / event.h
index 2168b9a..d34a44d 100644 (file)
@@ -19,7 +19,7 @@
 #define EVENT_INDIR                            0x008   /* send an indirection event to vcore */
 #define EVENT_VCORE_PRIVATE            0x010   /* Will go to the private VCPD mbox */
 /* Delivery style flags */
-#define EVENT_FALLBACK                 0x020   /* spam INDIRs if the vcore's offline */
+#define EVENT_SPAM_INDIR               0x020   /* spam INDIRs if the vcore's offline */
 #define EVENT_VCORE_MUST_RUN   0x040   /* Alerts go to a vcore that will run */
 #define EVENT_NOTHROTTLE               0x080   /* send all INDIRs (no throttling) */
 /* Not seriously used flags */
@@ -30,9 +30,6 @@
 #define EVENT_JUSTHANDLEIT             0x400   /* 2LS should handle the ev_q */
 #define EVENT_THREAD                   0x800   /* spawn thread to handle ev_q */
 
-/* Certain event flags apply to spam/fallback messages */
-#define EVENT_SPAM_FLAGS               (EVENT_IPI | EVENT_VCORE_MUST_RUN)
-
 /* Event Message Types */
 #define EV_NONE                                         0
 #define EV_PREEMPT_PENDING              1
@@ -101,17 +98,23 @@ struct event_queue_big {
 /* Vcore state flags.  K_LOCK means the kernel is writing */
 #define VC_K_LOCK                              0x001                           /* CASing with the kernel */
 #define VC_PREEMPTED                   0x002                           /* VC is preempted */
-#define VC_CAN_RCV_MSG                 0x004                           /* can receive FALLBACK */
+#define VC_CAN_RCV_MSG                 0x004                           /* someone will get msg */
 #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_context                     vcore_ctx;                      /* for preemptions */
        struct ancillary_state          preempt_anc;
        struct user_context                     uthread_ctx;            /* for preempts or notifs */
-       uintptr_t                                       transition_stack;       /* advertised by the user */
+       uintptr_t                                       vcore_entry;            /* advertised by the user */
+       uintptr_t                                       vcore_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 */