Pradeep k(deleted)
|
Alternatives of epoll_create, epoll_ctl,epoll_wait in QNX
|
Pradeep k(deleted)
06/15/2017 1:03 AM
post117790
|
Alternatives of epoll_create, epoll_ctl,epoll_wait in QNX
I am in the process of porting Daemon Linux code to QNX environment.
In which few functionalities are not available/present in QNX, namely epoll_create(), epoll_wait(), epoll_ctl() are some
of them which were not available in QNX.
With limited knowledge I could figure it out poll() can be used in QNX as an alternative of epoll_wait().
Could someone please let me know are there any alternative functions to be used in QNX which retains the functionalities
of the epoll.
Thanks,
Pradeep
|
|
|
Mohan Kumar(deleted)
|
Re: Alternatives of epoll_create, epoll_ctl,epoll_wait in QNX
|
Mohan Kumar(deleted)
01/23/2019 9:12 AM
post119439
|
Re: Alternatives of epoll_create, epoll_ctl,epoll_wait in QNX
Hi,
Even I am blocked with the same question. Please suggest alternative API's for epoll_create(), epoll_ctl(), epoll_wait()
In addition I also need alternate API's for timerfd_settime(), Eventfd(), dgram_send(), dgram_recv() in QNX.
Thanks
MOhan
|
|
|
Elad Lahav
|
Re: Alternatives of epoll_create, epoll_ctl,epoll_wait in QNX
|
Elad Lahav
01/23/2019 9:35 AM
post119441
|
Re: Alternatives of epoll_create, epoll_ctl,epoll_wait in QNX
ionotify()
And you don't need timerfd*() in QNX. If you write your program around
an event loop with a MsgReceive() call then you can have all events
delivered as pulses, both from file descriptors (with ionotify()) and
timers.
timerfd() solves a problem that doesn't exist in QNX.
--Elad
On Wed, 2019-01-23 at 09:12 -0500, Mohan Kumar wrote:
> Hi,
>
> Even I am blocked with the same question. Please suggest alternative
> API's for epoll_create(), epoll_ctl(), epoll_wait()
>
> In addition I also need alternate API's for timerfd_settime(),
> Eventfd(), dgram_send(), dgram_recv() in QNX.
>
> Thanks
> MOhan
>
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post119439
> To cancel your subscription to this discussion, please e-mail ostech-
> core_os-unsubscribe@community.qnx.com
|
|
|
Albrecht Uhlmann
|
Re: Alternatives of epoll_create, epoll_ctl,epoll_wait in QNX
|
Albrecht Uhlmann
01/23/2019 11:37 AM
post119442
|
Re: Alternatives of epoll_create, epoll_ctl,epoll_wait in QNX
To my understanding, the most important use case for wanting to have timerfd() and friends available under QNX is
porting existing Linux code.
What Elad says is technically correct but it implies that this code being reworked to be run under QNX, which is often
not desired becaus it requires comprehensive QNX native knowledge (setting up channels and connections etc.). It would
be much nicer to simply have the Linux APIs available. We were actually considering writing a resource manager which
provides timerfd() and eventfd() APIs. For timers in the 5...10ms range the performance should be sufficient. If someone
is interested we could setup a project.
Regards,
Albrecht
|
|
|
Elad Lahav
|
Re: Alternatives of epoll_create, epoll_ctl,epoll_wait in QNX
|
Elad Lahav
01/23/2019 12:16 PM
post119443
|
Re: Alternatives of epoll_create, epoll_ctl,epoll_wait in QNX
I understand, and to some extent agree. The problem with this approach
is that eventually no one writes native QNX code, and then everyone
complains about performance.
Yes, it is trivial to implement timerfd() with a resource manager, but
now instead of a pulse being delivered by the kernel to the target
process you have the pulse delivered to the resource manager, which
then does MsgDeliverEvent() to the target process. Multiple kernel
entries, multiple address space switches. It works, but now well.
--Elad
On Wed, 2019-01-23 at 11:37 -0500, Albrecht Uhlmann wrote:
> To my understanding, the most important use case for wanting to have
> timerfd() and friends available under QNX is porting existing Linux
> code.
> What Elad says is technically correct but it implies that this code
> being reworked to be run under QNX, which is often not desired becaus
> it requires comprehensive QNX native knowledge (setting up channels
> and connections etc.). It would be much nicer to simply have the
> Linux APIs available. We were actually considering writing a resource
> manager which provides timerfd() and eventfd() APIs. For timers in
> the 5...10ms range the performance should be sufficient. If someone
> is interested we could setup a project.
>
> Regards,
> Albrecht
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post119442
> To cancel your subscription to this discussion, please e-mail ostech-
> core_os-unsubscribe@community.qnx.com
|
|
|
Will Miles
|
Re: Alternatives of epoll_create, epoll_ctl,epoll_wait in QNX
|
Will Miles
01/23/2019 1:06 PM
post119444
|
Re: Alternatives of epoll_create, epoll_ctl,epoll_wait in QNX
Hi Albrecht,
I wrote one a couple of years ago when I was looking in to porting the Linux ptpd. I threw the source code up on https
://gitlab.com/wmiles/npshim ("Non-POSIX shims"); it's kind of lame but seemed to work for my limited test cases.
-Will
|
|
|
|