Jan Kiszka wrote:
 > +/* Timer operation modes */
 > +typedef enum xntimer_mode {
 > +    XNTM_MONOREL = 0,
 > +    XNTM_MONOABS = XNTIMER_ABSOLUTE,
 > +    XNTM_REALABS = XNTIMER_REALTIME | XNTIMER_ABSOLUTE
 > +} xntimer_mode_t;

Is not it a bit weird to use enums ? I meanç we use #defines everywhere
else.

 > +    default: /* XNTM_MONOABS || XNTM_REALABS */
 >              date = xnarch_ns_to_tsc(value);
 >              if (date <= now)
 >                      return -ETIMEDOUT;
 > +            __setbits(timer->status, XNTIMER_REALTIME);
 > +            break;

Having the same treatment for absolute monotonic and realtime clocks
looks suspicious.


 > +    default: /* XNTM_MONOABS || XNTM_REALABS */
 >              if (value <= timer->base->jiffies)
 >                      return -ETIMEDOUT;
 > +            __setbits(timer->status, XNTIMER_REALTIME);
 > +            break;

Same here


-- 


                                            Gilles Chanteperdrix.

_______________________________________________
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core

Reply via email to