first off, for kernel-based realtime (rtai), this is not possible at
all.

second, assuming you are going to call into this shared library from
uspace in a realtime context, you will need to audit the library source
code to make sure it is not making any API calls that are not OK for
realtime.

All that said: This is technically possible for uspace realtime but is
not currently facilitated by halcompile or "Makefile.modinc" which is a
Makefile fragment that it uses to actually do the work of building a .so
realtime component.

I will be happy to review patches to improve/fix this.  Basically, it
would be necessary to:

 * change Makefile.modinc.in so that it can supply extra linker
   arguments under the "%.so:" rule near where -lm is currently
   hard-coded (src/Makefile.modinc.in)

   We use some trickery regarding symbol visibility in .so realtime
   components, so that the EXPORT_SYMBOL directives are obeyed.  Right
   now the trick used in Makefile is newer and probably better than the
   one in Makefile.modinc.in.  I'm not sure whether either trick affects
   the ability to link in other libraries, but the newer trick is more
   like the normal way shared library symbol visibility is managed on
   Linux.  We should probably update Makefile.modinc.in to use the new
   trick, particularly if the old trick causes problems with additional
   shared libraries

 * change halcompile so that it can receive these extra arguments as
   commandline arguments and pass them on to make via the commandline
   (src/hal/utils/halcompile.g).  If it's feasible, halcompile should
   also refuse to accept the arguments if the realtime is not uspace.

 * document these features in the manual (docs/man/man1/halcompile.1,
   docs/src/hal/comp.txt)

 * and write a new test under tests/halcompile/ that shows these
   features work.  

Please be aware of our policy to use Linux Kernel-style Signed-Off-By
http://linuxcnc.org/docs/2.7/html/code/contributing-to-linuxcnc.html#_signed_off_by_policy

You can use several methods, such as a github pull request, to share
your patches for review:
http://linuxcnc.org/docs/2.7/html/code/contributing-to-linuxcnc.html#_linuxcnc_on_github

Jeff

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to