]>
git.proxmox.com Git - ceph.git/blob - ceph/src/msg/async/EventPoll.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
4 * Ceph - scalable distributed file system
6 * Copyright (C) 2022 Rafael Lopez <rafael.lopez@softiron.com>
9 * This is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License version 2.1, as published by the Free Software
12 * Foundation. See file COPYING.
16 #ifndef CEPH_MSG_EVENTPOLL_H
17 #define CEPH_MSG_EVENTPOLL_H
27 typedef struct pollfd POLLFD
;
29 class PollDriver
: public EventDriver
{
36 int poll_ctl(int, int, int);
39 explicit PollDriver(CephContext
*c
): cct(c
) {}
40 ~PollDriver() override
{}
42 int init(EventCenter
*c
, int nevent
) override
;
43 int add_event(int fd
, int cur_mask
, int add_mask
) override
;
44 int del_event(int fd
, int cur_mask
, int del_mask
) override
;
45 int resize_events(int newsize
) override
;
46 int event_wait(std::vector
<FiredFileEvent
> &fired_events
,
47 struct timeval
*tp
) override
;