Skip to content

Commit

Permalink
- (djm) [atomicio.c] Fix spin avoidance for platforms that define
Browse files Browse the repository at this point in the history
   EWOULDBLOCK; patch from ben AT psc.edu
  • Loading branch information
djmdjm committed Sep 21, 2007
1 parent 6ebefac commit ed626b4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
6 changes: 5 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
20070921
- (djm) [atomicio.c] Fix spin avoidance for platforms that define
EWOULDBLOCK; patch from ben AT psc.edu

20070917
- (djm) OpenBSD CVS Sync
- [email protected] 2007/08/23 02:49:43
Expand Down Expand Up @@ -3258,4 +3262,4 @@
OpenServer 6 and add osr5bigcrypt support so when someone migrates
passwords between UnixWare and OpenServer they will still work. OK dtucker@

$Id: ChangeLog,v 1.4757 2007/09/17 15:32:32 tim Exp $
$Id: ChangeLog,v 1.4758 2007/09/21 03:12:49 djm Exp $
16 changes: 8 additions & 8 deletions atomicio.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ atomicio(ssize_t (*f) (int, void *, size_t), int fd, void *_s, size_t n)
res = (f) (fd, s + pos, n - pos);
switch (res) {
case -1:
#ifdef EWOULDBLOCK
if (errno == EINTR || errno == EWOULDBLOCK)
#else
if (errno == EINTR)
#endif
continue;
#ifdef EWOULDBLOCK
if (errno == EAGAIN || errno == EWOULDBLOCK) {
#else
if (errno == EAGAIN) {
#endif
(void)poll(&pfd, 1, -1);
continue;
}
Expand Down Expand Up @@ -103,13 +103,13 @@ atomiciov(ssize_t (*f) (int, const struct iovec *, int), int fd,
res = (f) (fd, iov, iovcnt);
switch (res) {
case -1:
#ifdef EWOULDBLOCK
if (errno == EINTR || errno == EWOULDBLOCK)
#else
if (errno == EINTR)
#endif
continue;
#ifdef EWOULDBLOCK
if (errno == EAGAIN || errno == EWOULDBLOCK) {
#else
if (errno == EAGAIN) {
#endif
(void)poll(&pfd, 1, -1);
continue;
}
Expand Down

0 comments on commit ed626b4

Please sign in to comment.