[fpc-pascal] Inotify low-level functions
Marco van de Voort
marcov at stack.nl
Tue Apr 6 10:26:16 CEST 2010
In our previous episode, Micha? 'rysiek' =?utf-8?q?_Wo=C5=BAniak?=" said:
> Some time ago (2 years, actually) I needed to implement inotify support for
> FPC; never got around to contributing... well, the time has come. :)
>
> As far as I can tell, the Inotify Linux kernel interface hasn't got decent
> support in FPC yet, right?
>
> So, here are my questions:
> - where should I put the inotify_init() and other low-level functions
> (actually, wrappers around system calls)? It used to be Linux.pas, but I
> hear that's deprecated...
No. Linux is fine. The "old" linux is deprecated, which was what now is
baseunix and Unix. The "new" Linux unit is exactly for this, linux specific
kernel interfaces.
Please try to set it up in a way that it works for all Linuxes though (so
keep 32/64bit, endianness and non-x86 in mind)
> - how do I contribute so that the code gets into the right file? Branch? Send
> diffs/patches?
Open a mantis bug ticket, with as clean as possible patches, with some demo
programs. This allows the committer to evaluate patches easily, and e.g.
retarget them to a different unit without editing for days.
> - where/how should I contribute a bit higher-level stuff (more usable
> interface functions, plus an object-oriented interface)?
Higher level interfaces usually get a crossplatform package in packages/. So
that would require to define a subset of the functionality that is
implementable on the core platforms (kevent on FreeBSD and afaik also OS X,
and Windows also has some notify mechanism) (otherwise we end up with
umpteen thin linux/x86 object wrappers)
This is also why nothing has happened here. It takes some dedication to make
this happen. But now in the VM age, it has become a lot easier to test on
e.g. Freebsd.
More information about the fpc-pascal
mailing list