interrupted system call interface
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
#include "epicsAssert.h"
|
||||
#include "epicsSignal.h"
|
||||
#include "osiSock.h"
|
||||
|
||||
#define nDigitsDottedIP 4u
|
||||
@@ -167,3 +168,14 @@ void epicsShareAPI ipAddrToDottedIP
|
||||
}
|
||||
}
|
||||
|
||||
epicsShareFunc void epicsShareAPI epicsSocketEnableInterruptedSystemCall ()
|
||||
{
|
||||
epicsSignalInstallSigUrgIgnore ();
|
||||
}
|
||||
|
||||
epicsShareFunc void epicsShareAPI epicsSocketInterruptSystemCall
|
||||
( struct epicsThreadOSD * threadId )
|
||||
{
|
||||
epicsSignalRaiseSigUrg ( threadId );
|
||||
}
|
||||
|
||||
|
||||
@@ -166,6 +166,16 @@ epicsShareFunc void epicsShareAPI osiSockDiscoverBroadcastAddresses
|
||||
*/
|
||||
epicsShareFunc osiSockAddr epicsShareAPI osiLocalAddr (SOCKET socket);
|
||||
|
||||
|
||||
/*
|
||||
* Certain os, such as HPUX, do not unblock a socket system call
|
||||
* when another thread asynchronously calls both shutdown() and
|
||||
* close(). To solve this problem we need to employ OS specific
|
||||
* mechanisms.
|
||||
*/
|
||||
epicsShareFunc void epicsShareAPI epicsSocketEnableInterruptedSystemCall ();
|
||||
epicsShareFunc void epicsShareAPI epicsSocketInterruptSystemCall ( struct epicsThreadOSD * );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user