diff --git a/src/lib/nfs/Glue.cxx b/src/lib/nfs/Glue.cxx index be82bd855..290e30e0b 100644 --- a/src/lib/nfs/Glue.cxx +++ b/src/lib/nfs/Glue.cxx @@ -48,6 +48,14 @@ nfs_finish() BlockingCall(nfs_glue->GetEventLoop(), [](){ nfs_glue.Destruct(); }); } +Event_Loop & +nfs_get_event_loop() +{ + assert(in_use > 0); + + return nfs_glue->GetEventLoop(); +} + NfsConnection & nfs_get_connection(const char *server, const char *export_name) { diff --git a/src/lib/nfs/Glue.hxx b/src/lib/nfs/Glue.hxx index d83daf37e..24371a737 100644 --- a/src/lib/nfs/Glue.hxx +++ b/src/lib/nfs/Glue.hxx @@ -32,6 +32,13 @@ nfs_init(EventLoop &event_loop); void nfs_finish(); +/** + * Return the EventLoop that was passed to nfs_init(). + */ +gcc_const +Event_Loop & +nfs_get_event_loop(); + gcc_pure NfsConnection & nfs_get_connection(const char *server, const char *export_name);