[Dovecot] Patch: ioloop using kqueue/kevent for FreeBSD
Vaclav Haisman
V.Haisman at sh.cvut.cz
Wed Dec 14 22:54:06 EET 2005
On Wed, 14 Dec 2005, Timo Sirainen wrote:
> On Wed, 2005-12-14 at 17:42 +0100, Vaclav Haisman wrote:
[...]
> - unsigned char mode:3; -> enum io_condition in the struct. More
> readable and it doesn't use more space anyway unless you're going to add
> more fields.
Actually I think that the bitfield might be necessary. I used it because I
didn't want to mask out the uninteresting bits of condition flags on lines like
the the following:
ctx->fds[fd].mode |= condition;
Without either the bitfield or some masking it is possible that this will set
some higher bits on. If it happens then the parts of code that compare the mode
against zero will break.
Is it not possible for some higher bit to be set? Can the code stay as it is?
[...]
>
Vaclav Haisman
More information about the dovecot
mailing list