Looking at unit syncobjs might save you some ifdefs and trouble.
Thanks for the tip. I always get hassled about keeping the IFDEF's as
little as possible. I will go browse the SyncObjs unit now.
Regards,
Graeme.
--
There's no place like 127.0.0.1
___
Hi Vinzent,
You got me one the right track, I think... :-)
I thought the counter in Semaphores get incremented, but as you stated
(and reading some Man Pages), they get decremented.
I then change my code from:
> if sem_init(FSemaphore, 0, 1) <> 0 then
> raise Exception.Create('Failed to
On Monday 24 July 2006 10:21, Graeme Geldenhuys wrote:
> procedure TtiPool.CreatePoolSemaphore;
> begin
> {$IFDEF MSWINDOWS}
> if FSemaphore <> 0 then
> CloseHandle( FSemaphore ) ;
> FSemaphore := CreateSemaphore( nil, FiMaxPoolSize, FiMaxPoolSize,
> nil ); {$ENDIF MSWINDOWS}
> {$IFDEF
> Looking at my code, I might have initialized my semaphore incorrectly.
>
> The Windows portion works, and I tried to port it to Linux as follows...
>
> procedure TtiPool.CreatePoolSemaphore;
> begin
> {$IFDEF MSWINDOWS}
> if FSemaphore <> 0 then
> CloseHandle( FSemaphore ) ;
> FSemaph
Looking at my code, I might have initialized my semaphore incorrectly.
The Windows portion works, and I tried to port it to Linux as follows...
procedure TtiPool.CreatePoolSemaphore;
begin
{$IFDEF MSWINDOWS}
if FSemaphore <> 0 then
CloseHandle( FSemaphore ) ;
FSemaphore := CreateSemaphore(