Ignore this please; I did 'git send-email master..mybranch' and hadn't sync'd master to head. My bad.
On Tue, May 17, 2016 at 2:03 PM, Dan Cross <[email protected]> wrote: > From: Barret Rhoden <[email protected]> > > The mailbox headers (e.g. ucq.h) needed parts of event.h, but later parts > of event.h needed the mailbox headers. Previously we dealt with this by > being careful with where we #included. Commit df786ca456cb ("Replace > #include guards with #pragma once.") broke that for evbitmap.h. > > The right fix is to split out the parts of the header that the mailboxes > need into it's own header. This should help avoid future issues with other > mailboxes. FWIW, I don't know if we could keep the old style (even if I > wanted to) with the #pragma once, which is probably why that one was left > as an ifndef. > > Reinstall your kernel headers. > > Signed-off-by: Barret Rhoden <[email protected]> > --- > kern/include/ros/ceq.h | 1 + > kern/include/ros/evbitmap.h | 3 +-- > kern/include/ros/event.h | 49 +-------------------------------------- > kern/include/ros/event_bits.h | 53 > +++++++++++++++++++++++++++++++++++++++++++ > kern/include/ros/ucq.h | 5 +--- > 5 files changed, 57 insertions(+), 54 deletions(-) > create mode 100644 kern/include/ros/event_bits.h > > diff --git a/kern/include/ros/ceq.h b/kern/include/ros/ceq.h > index d7e3f27..52ace6d 100644 > --- a/kern/include/ros/ceq.h > +++ b/kern/include/ros/ceq.h > @@ -34,6 +34,7 @@ > > #pragma once > > +#include <ros/event_bits.h> > #include <ros/atomic.h> > #include <ros/ring_buffer.h> > > diff --git a/kern/include/ros/evbitmap.h b/kern/include/ros/evbitmap.h > index 4451653..3b0220f 100644 > --- a/kern/include/ros/evbitmap.h > +++ b/kern/include/ros/evbitmap.h > @@ -7,8 +7,7 @@ > > #pragma once > > -/* Include this outside the ifndef, due to circular include concerns. */ > -#include <ros/event.h> > +#include <ros/event_bits.h> > > struct evbitmap { > bool check_bits; > diff --git a/kern/include/ros/event.h b/kern/include/ros/event.h > index 8719916..0afb63a 100644 > --- a/kern/include/ros/event.h > +++ b/kern/include/ros/event.h > @@ -6,57 +6,10 @@ > > #pragma once > > -#include <ros/common.h> > +#include <ros/event_bits.h> > #include <ros/atomic.h> > #include <ros/trapframe.h> > -/* #include <ros/ucq.h> included below */ > -/* #include <ros/evbitmap.h> included below */ > > -/* Event Delivery Flags from the process to the kernel */ > -#define EVENT_IPI 0x00001 /* IPI the vcore > (usually with INDIR) */ > -#define EVENT_SPAM_PUBLIC 0x00002 /* spam the msg to public > vcpd mboxes */ > -#define EVENT_INDIR 0x00004 /* send an > indirection event to vcore */ > -#define EVENT_VCORE_PRIVATE 0x00008 /* Will go to the private > VCPD mbox */ > -#define EVENT_SPAM_INDIR 0x00010 /* spam INDIRs if the > vcore's offline */ > -#define EVENT_VCORE_MUST_RUN 0x00020 /* spams go to a vcore that will > run */ > -#define EVENT_NOTHROTTLE 0x00040 /* send all INDIRs (no > throttling) */ > -#define EVENT_ROUNDROBIN 0x00080 /* pick a vcore, RR style > */ > -#define EVENT_VCORE_APPRO 0x00100 /* send to where the > kernel wants */ > -#define EVENT_WAKEUP 0x00200 /* wake up the process > after sending */ > - > -/* Event Message Types */ > -#define EV_NONE 0 > -#define EV_PREEMPT_PENDING 1 > -#define EV_GANG_PREMPT_PENDING 2 > -#define EV_VCORE_PREEMPT 3 > -#define EV_GANG_RETURN 4 > -#define EV_USER_IPI 5 > -#define EV_PAGE_FAULT 6 > -#define EV_ALARM 7 > -#define EV_EVENT 8 > -#define EV_FREE_APPLE_PIE 9 > -#define EV_SYSCALL 10 > -#define EV_CHECK_MSGS 11 > -#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 > -#define MAX_NR_EVENT (NR_EVENT_TYPES + MAX_NR_DYN_EVENT) > - > -/* Want to keep this small and generic, but add items as you need them. > One > - * item some will need is an expiration time, which ought to be put in > the 64 > - * bit arg. Will need tweaking / thought as we come up with events. > These are > - * what get put on the per-core queue in procdata. */ > -struct event_msg { > - uint16_t ev_type; > - uint16_t ev_arg1; > - uint32_t ev_arg2; > - void *ev_arg3; > - uint64_t ev_arg4; > -}; > - > -/* Include here since the mboxes need to know event.h basics (e.g. > event_msg) */ > #include <ros/ucq.h> > #include <ros/evbitmap.h> > #include <ros/ceq.h> > diff --git a/kern/include/ros/event_bits.h b/kern/include/ros/event_bits.h > new file mode 100644 > index 0000000..5a67cee > --- /dev/null > +++ b/kern/include/ros/event_bits.h > @@ -0,0 +1,53 @@ > +/* Copyright (c) 2010-2011 The Regents of the University of California > + * Barret Rhoden <[email protected]> > + * See LICENSE for details. > + * > + * Bits for the kernel interface for event. */ > + > +#pragma once > + > +#include <ros/common.h> > + > +/* Event Delivery Flags from the process to the kernel */ > +#define EVENT_IPI 0x00001 /* IPI the vcore > (usually with INDIR) */ > +#define EVENT_SPAM_PUBLIC 0x00002 /* spam the msg to public > vcpd mboxes */ > +#define EVENT_INDIR 0x00004 /* send an > indirection event to vcore */ > +#define EVENT_VCORE_PRIVATE 0x00008 /* Will go to the private > VCPD mbox */ > +#define EVENT_SPAM_INDIR 0x00010 /* spam INDIRs if the > vcore's offline */ > +#define EVENT_VCORE_MUST_RUN 0x00020 /* spams go to a vcore that will > run */ > +#define EVENT_NOTHROTTLE 0x00040 /* send all INDIRs (no > throttling) */ > +#define EVENT_ROUNDROBIN 0x00080 /* pick a vcore, RR style > */ > +#define EVENT_VCORE_APPRO 0x00100 /* send to where the > kernel wants */ > +#define EVENT_WAKEUP 0x00200 /* wake up the process > after sending */ > + > +/* Event Message Types */ > +#define EV_NONE 0 > +#define EV_PREEMPT_PENDING 1 > +#define EV_GANG_PREMPT_PENDING 2 > +#define EV_VCORE_PREEMPT 3 > +#define EV_GANG_RETURN 4 > +#define EV_USER_IPI 5 > +#define EV_PAGE_FAULT 6 > +#define EV_ALARM 7 > +#define EV_EVENT 8 > +#define EV_FREE_APPLE_PIE 9 > +#define EV_SYSCALL 10 > +#define EV_CHECK_MSGS 11 > +#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 > +#define MAX_NR_EVENT (NR_EVENT_TYPES + MAX_NR_DYN_EVENT) > + > +/* Want to keep this small and generic, but add items as you need them. > One > + * item some will need is an expiration time, which ought to be put in > the 64 > + * bit arg. Will need tweaking / thought as we come up with events. > These are > + * what get put on the per-core queue in procdata. */ > +struct event_msg { > + uint16_t ev_type; > + uint16_t ev_arg1; > + uint32_t ev_arg2; > + void *ev_arg3; > + uint64_t ev_arg4; > +}; > diff --git a/kern/include/ros/ucq.h b/kern/include/ros/ucq.h > index 199c139..3b76585 100644 > --- a/kern/include/ros/ucq.h > +++ b/kern/include/ros/ucq.h > @@ -17,7 +17,7 @@ > > #pragma once > > -#include <ros/common.h> > +#include <ros/event_bits.h> > #include <ros/atomic.h> > #include <ros/arch/mmu.h> > > @@ -49,9 +49,6 @@ 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 */ > -- > 2.8.0.rc3.226.g39d4020 > > -- You received this message because you are subscribed to the Google Groups "Akaros" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. For more options, visit https://groups.google.com/d/optout.
