This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RT Patch set, SystemTap, tcp test fails


On Sun, Nov 19, 2006 at 02:07:05PM -0500, Frank Ch. Eigler wrote:
> According to mingo's patch set, HRTIMER_REL and HRTIMER_ABS were
> simply renamed to HRTIMER_MODE_REL and HRTIMER_MODE_ABS.  Since these
> are enums instead of macros, a little #ifndef/#define hack would not
> work.  Unless the RT patches identify themselves at compile time, it
> may be tricky to generate code that works with both base and patched
> kernel.

The real-time patch replaces the enumeration constants:

 enum hrtimer_mode {
-       HRTIMER_ABS,    /* Time value is absolute */
-       HRTIMER_REL,    /* Time value is relative to now */
+       HRTIMER_MODE_ABS,       /* Time value is absolute */
+       HRTIMER_MODE_REL,       /* Time value is relative to now */
 };

It is possible to achieve backwards compatibility in enumerations by
simply declaring the deprecated names to have the values assigned to
the new names:

enum hrtimer_mode {
	HRTIMER_MODE_ABS,	/* Time value is absolute */
	HRTIMER_ABS = HRTIMER_MODE_ABS,	/* backwards compatibility */
	HRTIMER_MODE_REL,	/* Time value is relative to now */
	HRTIMER_REL = HRTIMER_MODE_REL,	/* backwards compatibility */
};

Regards,

	Bill Rugolsky


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]