Changeset 14:3caa1d3122db in xplcommon for src/xplcommon/posix/WaitableEvent.cc
- Timestamp:
- 12/29/12 10:03:12 (11 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/xplcommon/posix/WaitableEvent.cc
r8 r14 32 32 #include "WaitableEvent.h" 33 33 34 #include <cassert>35 #include <cerrno>36 #include <cstdio>37 38 34 #include <poll.h> 39 35 #include <unistd.h> … … 51 47 fired(false) 52 48 { 53 assert(fd>=0); 49 if (fd<0) { 50 setErrorCodeFromErrno(); 51 } 54 52 } 55 53 … … 68 66 if (write(fd, &one, sizeof(one))<0) { 69 67 if (errno!=EAGAIN) { 70 setErrorCode (errno);68 setErrorCodeFromErrno(); 71 69 } 72 70 } … … 111 109 if (read(fd, &value, sizeof(value))<0) { 112 110 if (errno!=EAGAIN) { 113 setErrorCode (errno);111 setErrorCodeFromErrno(); 114 112 } 115 113 } else {
Note:
See TracChangeset
for help on using the changeset viewer.