Well, it seems to me that the proposed library wrapper code
could start to get rather verbose by the time one adds in
these changes (plus the mutexes).
Sorry -- I was probably speaking too rhetorically. In fact, it's
not completely clear to me that it can (always) be done. For
example, the answer depends on knowing the clockid. But
what if the file descriptor has been handed off to some code
that doesn't know the clock type (i.e., isn't accessing the fd
via your suggested library)?
Cheers,
Michael
-