[fpc-devel] Why FreeBSD sem_init() works different to Linux?

Graeme Geldenhuys graeme at geldenhuys.co.uk
Thu Feb 7 10:37:11 CET 2013


On 2013-02-07 09:13, Sven Barth wrote:
> But the ifdefs will only be in one location.

I understand that, but there will be IFDEF's none the less. As I said, I
hate IFDEF's in application/library code. They have their place in FPC
source code, but I don't like them anywhere else. That's just me.


> This way you'd reduce that to one and rely on OS functionality 
> nevertheless (which is known to work - if used correctly :P ).

Having a clean Object Pascal based Semaphore implementation will be
useful, and clean code. My unit testing and usage of it in tiOPF on
Windows, Linux and FreeBSD will hopefully prove that it works too.

Once done, I'll post a link to the code. You are welcome to see if it
will fit in the SyncObjs unit.

Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/




More information about the fpc-devel mailing list