On Fri, 19 Nov 2010 22:06 -0700, "Sebastian Kuzminsky" <[email protected]> wrote: > rtapi has a big data structure called rtapi_data, which lives in shared > memory and is used by all the rtapi modules. This struct keeps track of > the list of realtime modules loaded, the amount of shared memory in use, > etc etc. It's in src/rtapi/rtapi_common.h [0]. > > > rtapi_data has a cool feature: it has a "revision code" integer inside > it, and all users of this shared memory verify that they are using the > same revision of the struct as everyone else before they'll touch > it[1]. I guess this is handy when you have out-of-tree rtapi modules > and forget to recompile them when someone changes rtapi_data_t. I can't > think of another use for it... > > Unfortunately the system is totally broken, and has been since we > switched to git. It computes the rtapi_data revision code from the > $Revision$ CVS Keyword in rtapi_common.h [2], but of course git doesn't > do any keyword substitution. We've been using revision code of zero > since switching to git [3]. > > I want to just rip it out. But if anyone thinks it's useful and wants > to keep it, i could try to fix it maybe using the git sha1 of the blob > of rtapi_common.h and some build-system obscenity. > > What does the executive decision from the board say? >
I think we should keep it, but avoid obscenities by eliminating the automatic generation of the revision code. #define it to be some integer value in rtapi_common.h, with a comment telling future coders to increment it if they change the structure definition. There is a similar revision code in HAL somewhere, but I think it may already be manually incremented. The idea behind both of those codes is to avoid the nasty crashes that can happen in kernel space. It is mostly an issue if someone is using locally written hal modules, or if they have run-in-place builds of different versions and accidentally attempt to load kernel modules from the wrong tree. Regards, John Kasunich -- John Kasunich [email protected] ------------------------------------------------------------------------------ Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today http://p.sf.net/sfu/msIE9-sfdev2dev _______________________________________________ Emc-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-developers
