ClearInterruptHandler clears the user interrupt handler
()
| 968 | |
| 969 | // ClearInterruptHandler clears the user interrupt handler |
| 970 | func (r *Runtime) ClearInterruptHandler() { |
| 971 | if r == nil { |
| 972 | return |
| 973 | } |
| 974 | if !r.ensureOwnerAccess() { |
| 975 | return |
| 976 | } |
| 977 | r.mu.Lock() |
| 978 | defer r.mu.Unlock() |
| 979 | if r.ref == nil { |
| 980 | return |
| 981 | } |
| 982 | r.interruptHandlerState.Store(nil) |
| 983 | C.ClearInterruptHandler(r.ref) |
| 984 | } |
| 985 | |
| 986 | // callInterruptHandler is called from C layer via runtime mapping (internal use) |
| 987 | func (r *Runtime) callInterruptHandler() int { |