[PATCH] altq_subr.c: Disable x86 specific code on RTEMS

Gedare Bloom gedare at gwu.edu
Wed Jul 15 15:39:20 UTC 2015


the comments on the CPP lines.

On Wed, Jul 15, 2015 at 11:31 AM, Joel Sherrill
<joel.sherrill at oarcorp.com> wrote:
> OK but what about the patch itself technically?
>
> It was only subtracting a blank line so once I fix that,
> what else?
>
>
> On 7/15/2015 2:59 AM, Sebastian Huber wrote:
>>
>> I tried to clarify the rules for FreeBSD code changes:
>>
>>
>> https://git.rtems.org/rtems-libbsd/commit/?id=a57dfa0dedc1f25c4dfd6e0c786a1dbf72f44a03
>>
>> On 15/07/15 00:42, Joel Sherrill wrote:
>>>
>>> ---
>>>    freebsd/sys/contrib/altq/altq/altq_subr.c |    7 ++++++-
>>>    1 files changed, 6 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/freebsd/sys/contrib/altq/altq/altq_subr.c
>>> b/freebsd/sys/contrib/altq/altq/altq_subr.c
>>> index 3ebd58d..55f0977 100644
>>> --- a/freebsd/sys/contrib/altq/altq/altq_subr.c
>>> +++ b/freebsd/sys/contrib/altq/altq/altq_subr.c
>>> @@ -930,6 +930,9 @@ init_machclk_setup(void)
>>>    #if defined(__NetBSD__) && defined(MULTIPROCESSOR)
>>>         machclk_usepcc = 0;
>>>    #endif
>>> +#if defined(__rtems__)
>>> +               machclk_usepcc = 0;
>>> +#else
>>>    #if defined(__amd64__) || defined(__i386__)
>>>         /* check if TSC is available */
>>>    #ifdef __FreeBSD__
>>> @@ -940,6 +943,7 @@ init_machclk_setup(void)
>>>    #endif
>>>                 machclk_usepcc = 0;
>>>    #endif
>>> +#endif
>>>    }
>>>
>>>    void
>>> @@ -967,6 +971,7 @@ init_machclk(void)
>>>          * if the clock frequency (of Pentium TSC or Alpha PCC) is
>>>          * accessible, just use it.
>>>          */
>>> +#ifndef __rtems__
>>>    #if defined(__amd64__) || defined(__i386__)
>>>    #ifdef __FreeBSD__
>>>         machclk_freq = atomic_load_acq_64(&tsc_freq);
>>> @@ -976,7 +981,7 @@ init_machclk(void)
>>>         machclk_freq = pentium_mhz * 1000000;
>>>    #endif
>>>    #endif
>>> -
>>> +#endif
>>>         /*
>>>          * if we don't know the clock frequency, measure it.
>>>          */
>>
>>
>
> --
> Joel Sherrill, Ph.D.             Director of Research & Development
> joel.sherrill at OARcorp.com        On-Line Applications Research
> Ask me about RTEMS: a free RTOS  Huntsville AL 35805
> Support Available                (256) 722-9985
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel



More information about the devel mailing list