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
--000000000000abb49a05eb26f393
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

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.

--=20
=D0=AF=D1=80=D0=BE=D1=81=D0=BB=D0=B0=D0=B2 =D0=9C=D0=B0=D1=88=D0=BA=D0=BE

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

--000000000000abb49a05eb26f393
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"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_CLE=
AR 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 sta=
ys 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><b=
r></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_DIS=
PATCH gets switched off. After that, I did read the /src/sys/kern/kern_even=
t.c source file. The only state that I had found changed is data plus fflag=
s fields. The was a confusing bit of manual.<br></div><div><br>-- <br><div =
dir=3D"ltr" class=3D"gmail_signature" data-smartmail=3D"gmail_signature"><d=
iv dir=3D"ltr"><div><div dir=3D"ltr"><div><div dir=3D"ltr"><div><div dir=3D=
"ltr"><div dir=3D"ltr"><div dir=3D"ltr"><div dir=3D"ltr"><div dir=3D"ltr"><=
div dir=3D"ltr"><div dir=3D"ltr"><div dir=3D"ltr"><div dir=3D"ltr">=D0=AF=
=D1=80=D0=BE=D1=81=D0=BB=D0=B0=D0=B2 =D0=9C=D0=B0=D1=88=D0=BA=D0=BE</div><d=
iv dir=3D"ltr"><br><div><a href=3D"tel:+380+50+56+75+347" target=3D"_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>

--000000000000abb49a05eb26f393--



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