[PATCH] Separate event loop implementation by specific macros

Jouni Malinen j
Tue Apr 1 01:34:52 PDT 2014


On Sat, Mar 22, 2014 at 03:16:17PM +0900, Masashi Honma wrote:
> This patch separates event loop implementation by macros to introduce
> following epoll() option.

The concept of merging CONFIG_ELOOP_POLL to CONFIG_ELOOP looks fine, but
this breaks existing use case of CONFIG_ELOOP=eloop_win and custom
implementation using some other eloop wrappers. The eloop.c one is the
special case, not the other way around, i.e., the source code file is
really supposed to be src/utils/$(CONFIG_ELOOP).c with the exception of
select and poll using eloop.c (and same for the new epoll option).

It could be clearer to separate CONFIG_ELOOP from the file name by using
two variables within the makefiles, i.e., CONFIG_ELOOP could be empty
(which would by default use select unless CONFIG_ELOOP_POLL is set in
which case the default would be poll), select, eloop_win, poll, epoll,
or any other eloop_* value. These would then map to the file name as
follows:
- select, poll, epoll --> src/utils/eloop.c
- eloop_* --> src/utils/eloop_*.c

-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list