On Tue, 14 Apr 2009, Graeme Geldenhuys wrote:
> On Mon, Apr 13, 2009 at 11:49 PM, Seth Grover <sethdgro...@gmail.com> wrote: > > Is there not a cross-platform semaphore API in Free Pascal? I planned > > About 4 years ago there wasn't, so I had to use IFDEF's in my code. I > haven't looked in newer versions of FPC if there is a cross-platform > API available. I would be interested in this as well. Well: TThreadManager = Record // skip some stuff SemaphoreInit : TSempahoreInitHandler; SemaphoreDestroy : TSemaphoreDestroyHandler; SemaphorePost : TSemaphorePostHandler; SemaphoreWait : TSemaphoreWaitHandler; end; Use GetThreadManager() to retrieve the thread manager, and then simply use the various functions. This should work cross-platform, but it seems that the Windows implementation is empty. Maybe we can use your functions to implement the windows part. Michael. _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal