Re: struct timespec

Linus Torvalds (torvalds@cs.helsinki.fi)
Wed, 26 Jun 1996 11:44:30 +0300 (EET DST)


On Tue, 18 Jun 1996, Thomas Gschwind wrote:
>
> Last week, I found out, that timespec is declared as
> struct timespec {
> long tv_sec; /* seconds */
> long tv_nsec; /* nanoseconds */
> };
>
> However pthreads declares it in its own header files as
> struct timespec {
> long ts_sec; /* seconds */
> long ts_nsec; /* nanoseconds */
> };
> which seems a little bit more intuitive to me.
>
> I made a little patch, which replaces tv_n?sec in ts_n?sec.

"ts_[n]sec" _is_ a bit more intuitive, but it's WRONG. Strange but true,
it really _is_ supposed to be "tv_[n]sec" even for timespec.

In short, you need to fix the pthreads library, not linux.

Linus