lib/nfs/Glue: add EventLoop& accessor

This commit is contained in:
Max Kellermann 2017-01-26 09:19:25 +01:00
parent 7af8e3937f
commit d4993c405e
2 changed files with 15 additions and 0 deletions

View File

@ -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)
{

View File

@ -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);