2016-05-12 23:43:17 +03:00
|
|
|
/*
|
2019-06-20 02:58:25 +03:00
|
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
2016-05-12 23:43:17 +03:00
|
|
|
*
|
2019-06-20 02:58:25 +03:00
|
|
|
* This software may be used and distributed according to the terms of the
|
|
|
|
* GNU General Public License version 2.
|
2016-05-12 23:43:17 +03:00
|
|
|
*/
|
2019-10-11 15:26:59 +03:00
|
|
|
|
2018-03-20 03:01:15 +03:00
|
|
|
#include "eden/fs/fuse/PollHandle.h"
|
2016-05-12 23:43:17 +03:00
|
|
|
|
|
|
|
namespace facebook {
|
|
|
|
namespace eden {
|
|
|
|
|
2017-07-22 00:50:24 +03:00
|
|
|
void PollHandle::Deleter::operator()(fuse_pollhandle* /*h*/) {
|
2016-05-12 23:43:17 +03:00
|
|
|
#if FUSE_MAJOR_VERSION >= 8
|
|
|
|
fuse_pollhandle_destroy(h);
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
PollHandle::PollHandle(fuse_pollhandle* h) : h_(h, PollHandle::Deleter()) {}
|
|
|
|
|
|
|
|
void PollHandle::notify() {
|
|
|
|
#if FUSE_MAJOR_VERSION >= 8
|
|
|
|
fuse_lowlevel_notify_poll(h_.get());
|
|
|
|
#endif
|
|
|
|
}
|
2018-03-20 03:01:15 +03:00
|
|
|
|
2017-11-04 01:58:04 +03:00
|
|
|
} // namespace eden
|
|
|
|
} // namespace facebook
|