Re: Introducing a kqueue backend for GIO (GSoC)
- From: Dmitry Matveev <me dmitrymatveev co uk>
- To: <gtk-devel-list gnome org>
- Subject: Re: Introducing a kqueue backend for GIO (GSoC)
- Date: Wed, 06 Jul 2011 20:34:01 +0000
Hello Colomban,
On 22/06/2011 04:25, Colomban Wendling wrote:
Yes, and as far as I understand the code correctly, I think the use
of
g_once_init_enter/leave() would be better appropriate here than the
plain lock and "initialized" var
I have rewritten it to use GOnce.
Also there is G_N_ELEMENTS() for calculating the size of a static
array
(e.g. in convert_kqueue_events_to_gio()).
Finally, I think the implementation of convert_kqueue_events_to_gio()
is
a bit overkill for what it really does, and would probably be cheaper
with a simple if() list. It's about 4 ifs, it's not like there were
plenty of them. But that's not important, and the compiler maybe
even
optimizes this out to get rid of the static array and the loop.
I have also realized that it was an overkill. Rewritten on ifs.
Thank you for your notes too!
Dmitry
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]