On Thu, 2009-12-03 at 10:22 +0100, Øyvind Harboe wrote:
> (Ref. discussion I think we've settled that the minidriver can either
> implement an ABI or use inlining for performance.)
> 
> On Thu, Dec 3, 2009 at 10:11 AM, Zach Welch <z...@superlucidity.net> wrote:
> > On Thu, 2009-12-03 at 09:53 +0100, Øyvind Harboe wrote:
> >> So the minidriver (including classic API) must have control over whether or
> >> not the following fn's gets inlined or not. These fn's really are in the 
> >> inner
> >> loops and boil away to *nothing* on a low performance low latency
> >> system.
> >
> > And they should now, after my patches.  I want to see yours again,
> > updated against the current master.  :)
> 
> I have an automake problem / include file problem I don't know how
> to solve in a pretty fashion:
> 
> jtag.h needs to include a minidriver_inline.h for the active minidriver.
> How to do that?

You should not need to add any new files at this point:

jtag/minidriver.h includes "minidriver_imp.h":
jtag/drivers/minidriver_imp.h   -->> the driver's implementation
jtag/minidriver/minidriver_imp.h -->> the minidriver's implementation

The minidriver's implementaiton includes "jtag_minidriver.h", which is
defined by the implementation:

jtag/minidummy/jtag_minidriver.h 
jtag/zy1000/jtag_minidriver.h 

Put stuff in these files...  Do not put new inline functions in
jtag/jtag.h. jtag/minidriver.h, or jtag/drivers/minidriver_imp.h.

> - I don't want to add "-I" to *all* places that #include "jtag.h" to the
> active minidriver
> 
> - #include ACTIVE_MINIDRIVER, using a #define?
> 
> I don't particularly like the #include "jtag.h" form. Why quotes
> rather than angle brackets BTW? Quotes allow including from
> the current directory, why should we allow the official jtag.h to
> be replaced by a variant local to a source dir? Can't think of
> why really.

Look at my mirror.  Go there right now. :)  I've mentioned my 'hdr' and
'tests' branches a few times.  You haven't looked at them, or you
wouldn't be asking this question.  That work is now on my master branch,
queued to be pushed.

Indeed, I was just about to reply to my post on this subject (see my
recent post with the subject "libopenocd... again?") to warn that I want
to push this series in the next couple of hours.

So, you've gone and read it now, right... did it answer your question?
Unfortunately, it needs a little more love before it's ready to push,
but the above "minidriver_imp.h" and "jtag_minidriver.h" will _not_ be
changed to use angle brackets...  Otherwise, these tricks don't work.

--Z
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to