summaryrefslogtreecommitdiff
path: root/tools/select.h
diff options
context:
space:
mode:
authorFrank Schmirler <vdr@schmirler.de>2010-12-02 08:56:19 +0100
committerFrank Schmirler <vdr@schmirler.de>2010-12-02 08:57:31 +0100
commite6249bf957a943920b11abbd9efac1efa18b1d00 (patch)
tree3cc549f4f35e3d0210f7e9dbabf68bf0e27770dc /tools/select.h
parent5e30711bfdb28085234a5ef6da4f4e44305ac3e4 (diff)
downloadvdr-plugin-streamdev-e6249bf957a943920b11abbd9efac1efa18b1d00.tar.gz
vdr-plugin-streamdev-e6249bf957a943920b11abbd9efac1efa18b1d00.tar.bz2
Snapshot 2007-04-03
Diffstat (limited to 'tools/select.h')
-rw-r--r--tools/select.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/select.h b/tools/select.h
index 7e873e2..a3622fd 100644
--- a/tools/select.h
+++ b/tools/select.h
@@ -11,8 +11,8 @@ class cTBSelect {
private:
int m_MaxFiled;
- fd_set m_Rfds;
- fd_set m_Wfds;
+ fd_set m_FdsQuery[2];
+ fd_set m_FdsResult[2];
public:
cTBSelect(void);
@@ -50,26 +50,26 @@ public:
};
inline void cTBSelect::Clear(void) {
- FD_ZERO(&m_Rfds);
- FD_ZERO(&m_Wfds);
+ FD_ZERO(&m_FdsQuery[0]);
+ FD_ZERO(&m_FdsQuery[1]);
m_MaxFiled = -1;
}
inline bool cTBSelect::Add(int Filed, bool Output /* = false */) {
if (Filed < 0) return false;
- FD_SET(Filed, Output ? &m_Wfds : &m_Rfds);
+ FD_SET(Filed, &m_FdsQuery[Output ? 1 : 0]);
if (Filed > m_MaxFiled) m_MaxFiled = Filed;
return true;
}
inline bool cTBSelect::CanRead(int FileNo) const {
if (FileNo < 0) return false;
- return FD_ISSET(FileNo, &m_Rfds);
+ return FD_ISSET(FileNo, &m_FdsResult[0]);
}
inline bool cTBSelect::CanWrite(int FileNo) const {
if (FileNo < 0) return false;
- return FD_ISSET(FileNo, &m_Wfds);
+ return FD_ISSET(FileNo, &m_FdsResult[1]);
}
#endif // TOOLBOX_SELECT_H