[patch] Drop an unnecessary use of writev
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 16 10:39:27 PST 2015
On Wed, Dec 16, 2015 at 7:27 AM, Rafael EspĂndola
<rafael.espindola at gmail.com> wrote:
> I think the code this patch deletes is based on a misunderstanding of
> what guarantees writev provides. In particular, writev with 1 iovec is
> not "more atomic" than a write.
>
> With the attached test program I get 'a's and 'b's on the same line on
> OS X when using both write and writev.
>
> Cheers,
> Rafael
The patch looks good to me, thank you.
I'm not sure why that assumption was made in the first place (at least
I don't see any mention of the atomicity on POSIX). I'll give it a
shot on FreeBSD in the next few hours and let you know if it works
fine (I don't see a reason why it shouldn't, but still).
Thanks,
--
Davide
"There are no solved problems; there are only problems that are more
or less solved" -- Henri Poincare
More information about the llvm-commits
mailing list