Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Oct 2022 16:36:41 +0300
From:      =?UTF-8?B?0K/RgNC+0YHQu9Cw0LIg0JzQsNGI0LrQvg==?= <yaroslaw.mashko@gmail.com>
To:        freebsd-hackers@freebsd.org
Subject:   I want some clarification on kqueue, EV_CLEAR flag
Message-ID:  <CAMVwyx%2Br4myEm_Az%2BWp-dtUUjq0zdbsxvLLHTs6HTuFe_a%2BRNg@mail.gmail.com>

next in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
Hello,

I learn how to manage events with a kqueue. I did some research and have a
confusion with EV_CLEAR and EV_DISPATCH flags.

So this message contains two questions.

1. I see that EV_DISPATCH flag stays with event no matter what steps do I
take. The EV_ADD | EV_ENABLE leaves the EV_DISPATCH flag in.
There seem that the only way to switch off EV_DISPATCH is to delete event
completely. Is it the case?

2. I was confused after a look at the man pages for kqueue. EV_CLEAR
section tells that the state gets reset. My thought were that EV_DISPATCH
gets switched off. After that, I did read the /src/sys/kern/kern_event.c
source file. The only state that I had found changed is data plus fflags
fields. The was a confusing bit of manual.

-- 
Ярослав Машко

+380 50 56 75 347 <+380+50+56+75+347>

[-- Attachment #2 --]
<div dir="ltr"><div>Hello,</div><div><br></div><div>I learn how to manage events with a kqueue. I did some research and have a confusion with EV_CLEAR and EV_DISPATCH flags.</div><div><br></div><div>So this message contains two questions.</div><div><br></div><div>1. I see that EV_DISPATCH flag stays with event no matter what steps do I take. The EV_ADD | EV_ENABLE leaves the EV_DISPATCH flag in.</div><div>There seem that the only way to switch off EV_DISPATCH is to delete event completely. Is it the case?</div><div><br></div><div>2. I was confused after a look at the man pages for kqueue. EV_CLEAR section tells that the state gets reset. My thought were that EV_DISPATCH gets switched off. After that, I did read the /src/sys/kern/kern_event.c source file. The only state that I had found changed is data plus fflags fields. The was a confusing bit of manual.<br></div><div><br>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Ярослав Машко</div><div dir="ltr"><br><div><a href="tel:+380+50+56+75+347" target="_blank">+380 50 56 75 347</a></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAMVwyx%2Br4myEm_Az%2BWp-dtUUjq0zdbsxvLLHTs6HTuFe_a%2BRNg>