File tree Expand file tree Collapse file tree 2 files changed +4
-11
lines changed
Expand file tree Collapse file tree 2 files changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -451,16 +451,6 @@ int devPCIDisableInterrupt(const epicsPCIDevice *dev);
451451epicsShareFunc
452452const char * devPCIDeviceClassToString (int classId );
453453
454- /**
455- * @brief Optional callback invoked on PCI device hot-swap.
456- *
457- * This function pointer may be set to a custom handler that will be called
458- * when a PCI device is successfully reopened (e.g. after hot-swap).
459- *
460- * @param name Identifier or name of the reopened PCI device.
461- */
462- epicsShareExtern void (* devPCIonHotSwapHook )(const char * );
463-
464454#ifdef __cplusplus
465455} /* extern "C" */
466456#endif
Original file line number Diff line number Diff line change @@ -104,6 +104,9 @@ struct osdPCIDevice {
104104
105105 epicsMutexId devLock ; /* guard access to isrs list */
106106
107+ //Optional callback invoked on PCI device hot-swap.
108+ void (* onHotSwap )(struct osdPCIDevice * dev );
109+
107110 ELLNODE node ;
108111
109112 ELLLIST isrs ; /* contains struct osdISR */
@@ -997,7 +1000,7 @@ void isrThread(void* arg)
9971000 epicsMutexMustLock (osd -> devLock );
9981001 if (reopen_uio (osd ) == 0 ) {
9991002 errlogPrintf ("isrThread '%s': Successfully reopened UIO device\n" , name );
1000- if (devPCIonHotSwapHook ) devPCIonHotSwapHook ( name );
1003+ if (osd -> onHotSwap ) osd -> onHotSwap ( osd );
10011004 } else {
10021005 errlogPrintf ("isrThread '%s': UIO reopen failed. Will retry.\n" , name );
10031006 }
You can’t perform that action at this time.
0 commit comments