[RFC] termios: non-standard baudrates are not handled properly on Linux-systems (BZ#10339)
Paul Eggert
eggert@cs.ucla.edu
Tue Oct 9 18:02:00 GMT 2018
H. Peter Anvin wrote:
> In other words, B300
> == 7, so 7 baud would be represented by the value 300.
I'm afraid I'm confused by this use of "baud_t" and "7 baud". A baud is one
symbol per second, which in general differs from one bit per second. Still, if 7
baud corresponds to 300 bits per second, I'm having trouble seeing what's going
on. I guess you mean that a speed_t value equal to B300 corresponds to a baud_t
value equal to 300, but I could well be wrong.
I suggest giving the new type a name other than "baud_t" to avoid this sort of
confusion. "bps_t" or "bits_per_second_t" would be better.
> Now, assuming we really want to support baud rates over 4 Gbps, I'm thinking
> of an interface which might amount to a 5:27 floating point number. no sign
> bit, and biased for integers only.
Why not use 'float' or 'double' for this? No sense reinventing the
floating-point wheel.
More information about the Libc-alpha
mailing list