mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
There is no binding for xenevtchn_close(). In principle, this is a resource leak, but the typical usage is as a singleton that lives for the lifetime of the program. Ocaml 5 no longer permits storing a naked C pointer in an Ocaml value. Therefore, use a Custom block. This allows us to use the finaliser callback to call xenevtchn_close(), if the Ocaml object goes out of scope. Signed-off-by: Edwin Török <edvin.torok@citrix.com> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Christian Lindig <christian.lindig@citrix.com>