fdManager uses poll() on Windows and RTEMS too
RTEMS needs to use the "new" network stack Windows has poll since Vista Don't use poll on cygwin: it emulates poll() using select().
This commit is contained in:
@@ -19,28 +19,33 @@
|
||||
// 1) This library is not thread safe
|
||||
//
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#define instantiateRecourceLib
|
||||
#include "epicsAssert.h"
|
||||
#include "epicsThread.h"
|
||||
#include "fdManager.h"
|
||||
#include "locationException.h"
|
||||
|
||||
using std :: max;
|
||||
|
||||
fdManager fileDescriptorManager;
|
||||
|
||||
static const unsigned mSecPerSec = 1000u;
|
||||
static const unsigned uSecPerSec = 1000u * mSecPerSec;
|
||||
|
||||
#ifdef FDMGR_USE_POLL
|
||||
#ifdef _WIN32
|
||||
#define poll WSAPoll
|
||||
#endif
|
||||
|
||||
static const int PollEvents[] = { // must match fdRegType
|
||||
POLLRDNORM | POLLRDBAND | POLLIN | POLLHUP | POLLERR,
|
||||
POLLWRBAND | POLLWRNORM | POLLOUT | POLLERR,
|
||||
POLLPRI};
|
||||
#endif
|
||||
|
||||
#ifdef FDMGR_USE_SELECT
|
||||
#include <algorithm>
|
||||
using std :: max;
|
||||
#endif
|
||||
|
||||
fdManager fileDescriptorManager;
|
||||
|
||||
static const unsigned mSecPerSec = 1000u;
|
||||
static const unsigned uSecPerSec = 1000u * mSecPerSec;
|
||||
|
||||
//
|
||||
// fdManager::fdManager()
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user