The implementation using select() limits file desciptors to FD_SETSIZE,
typically 1024 on Linux. This number is too low for some applications,
for example for the CA gateway.
Therefore, Linux builds use poll() instead.
Per the manpage in the file's comment, SIOCOUTQ is equivalent to the
TIOCOUTQ ioctl, whose value can be obtained by including <sys/ioctl.h>,
which allows us to avoid including any system-specific headers. This is
desirable so that, on a musl system, it won't be necessary to install
kernel headers in order to build epics-base.
Since it's first been checked into Git, the Linux kernel has defined
SIOCOUTQ to be TIOCOUTQ [1].
From the three main libc options on Linux: glibc and uclibc use the
kernel headers, so both ioctls are available; and musl defines only
TIOCOUTQ in their own headers.
[1] 1da177e4c3
VxWorks does not mark abort() or exit() as noreturn.
Thus, functions declared noreturn which end in a call
to those functions cause a compiler warning on vxWorks.
Move isOkToBlock tracking to osdThread.
Targets except vxworks can store this flag in epicsThreadOSD.
Continue to use TLS w/ vxWorks.
Note that setting of isOkToBlock for "main" thread becomes lazy.
This flag causes EPICS to call abort() on assertion failures rather than
suspend the executing thread. With the epicsThreadSuspendSelf() behavior,
an IOC can end up in a difficult to detect error state where one or more
threads has essentially crashed due to an assertion failure.
This also matches the C behavior of assert(3)
Save/restore dbAddr::pfield around callbacks to
avoid corruption if CB forgets to restore.
Need to peak at dbChannel.h during libCom build.
So generate dbCoreAPI.h early, and add extra
-I to source location when compiling dbTrapWrite.c
Besides being deprecated in C++11 and removed in C++17, the intended use
case for this was always wrong, since std::unexpected() is called by the
C++ runtime when a function throws an exception that was not specified
in its "dynamic exception specification", which is different from an
exception thrown by user code which wasn't caught [1,2]. Using abort()
keeps the same behavior, but with the intended semantics.
We don't use std::abort() to simplify backwards compatibility.
[1] https://github.com/epics-base/epics-base/issues/343
[2] https://en.cppreference.com/w/cpp/error/unexpected