Johan Wikman 63141bb191 WIP: Allow the adding of any fds to the poll set
This is just a first step in a trial that will allow the addition
of any file descriptor to the general poll mechanism and hence
allow any i/o to be handled by the worker threads.

There is a structure

  typedef struct mxs_poll_data
  {
      void (*handler)(struct mxs_poll_data *data, int wid, uint32_t events);
      struct
      {
          int id;
      } thread;
  } MXS_POLL_DATA;

that any other structure (e.g. a DCB) encapsulating a file descriptor must
have as its first member (a C++ struct could basically derive from it).

That structure contains two members; 'handler' and 'thread.id'. Handler is a
pointer to a function taking a pointer to a struct mxs_poll_data, a worker thread
if and an epoll event mask as argument.

So, DCB is modified to have MXS_POLL_DATA as its first member and 'handler'
is initialized with a function that *knows* the passed MXS_POLL_DATA can
be downcast to a DCB.

process_pollq no longer exists, but is now called process_pollq_dcb. The
general stuff related to statistics etc. will be moved to poll_waitevents
itself after which the whole function is moved to dcb.c. At that point,
the handler pointer will be set in dcb_alloc().

Effectively poll.[h|c] will provide a generic mechanism for listening on
whatever descriptors and the dcb stuff will be part of dcb.[h|c].
2017-04-20 13:51:16 +03:00
..
2017-04-05 11:35:13 +03:00
2017-02-14 21:42:28 +02:00
2017-02-14 21:42:28 +02:00
2017-03-30 12:36:23 +03:00
2017-03-31 14:12:02 +03:00
2017-02-14 21:42:28 +02:00
2017-03-27 09:49:21 +02:00
2017-02-20 17:44:22 +02:00
2017-02-14 21:42:28 +02:00
2017-02-15 08:44:55 +02:00
2017-02-14 21:42:28 +02:00
2017-03-24 09:21:20 +02:00
2017-02-14 21:42:28 +02:00
2017-02-14 21:42:28 +02:00
2017-02-14 21:42:28 +02:00
2017-02-14 21:42:28 +02:00
2017-03-13 10:45:55 +02:00
2017-02-14 21:42:28 +02:00
2017-02-14 21:42:28 +02:00
2017-02-14 21:42:28 +02:00
2017-03-26 13:57:25 +03:00
2017-02-14 21:42:28 +02:00
2017-02-14 21:42:28 +02:00
2017-02-14 21:42:28 +02:00
2017-02-14 21:42:28 +02:00
2017-02-14 21:42:28 +02:00
2017-02-14 21:42:28 +02:00
2017-02-14 21:42:28 +02:00
2017-02-14 21:42:28 +02:00
2017-02-15 08:44:55 +02:00
2017-02-14 21:42:28 +02:00
2017-03-03 15:30:25 +02:00
2017-02-14 21:42:28 +02:00
2017-02-14 21:42:28 +02:00
2017-02-14 21:42:28 +02:00
2017-03-21 15:19:10 +02:00
2017-02-14 21:42:28 +02:00
2017-03-13 10:45:51 +02:00
2017-02-14 21:42:28 +02:00
2017-02-14 21:42:28 +02:00
2017-02-14 21:42:28 +02:00
2017-03-09 10:01:38 +02:00