All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-core] Analogy: A4L_CHAN_AREF_* and AREF_* and other macros
@ 2010-03-29 20:46 Daniele Nicolodi
  2010-04-04 13:43 ` Alexis Berlemont
  0 siblings, 1 reply; 2+ messages in thread
From: Daniele Nicolodi @ 2010-03-29 20:46 UTC (permalink / raw)
  To: xenomai-core, Alexis Berlemont

Hello Alexis,

I have noticed that in Analogy headers there are two sets of macros to
define channels references, one with prefix A4L_CHAN_AREF_ and the other
with prefix AREF_. I think keeping both is confusing and dangerous,
because similar symbols are defined with different numerical values!

The later form is the one used in comedi API and drivers, but i think it
is better to prefix all exported symbols and constants with a namespace
like string. I would be for keeping only the former form.

If you agree, I can provide a patch for you to review.

Similarly, I would rename TRIG_ constants to something like A4L_TRIG_,
and while at it I think TRIG_WAKE_EOS should become A4L_CMD_WAKE_EOS, as
it is a command flag and not a trigger source.

Similarly, it would be nice also to rename other macros defined in
command.h, adding at least a common A4L_ prefix. While at it I think
that, maybe after a rename to make their purpose more clear, CR_* macros
should be exposed to user space too.

If you think API breakage should be avoided, even in a so early stage of
development and diffusion, we can keep the old definitions for a while,
issuing deprecation warning (in this case those symbols would have to be
exposed as constant variables where to apply the __deprecated__ gcc
attribute).

Let me know what you think about this proposal.

Cheers,
-- 
Daniele



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-04-04 13:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-29 20:46 [Xenomai-core] Analogy: A4L_CHAN_AREF_* and AREF_* and other macros Daniele Nicolodi
2010-04-04 13:43 ` Alexis Berlemont

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.