Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2007-11

Re: Why TSemaphore not implemented for Win32?

2 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Felipe Monteiro de Carvalho
12 12 wrote
Why TSemaphore not implemented for Win32?

AFAIK TSemaphore is just an alias to different semaphore names on different unixes.

So it would never work on Win32 by definition.

but CreateSemaphore present in Delphi!

No it's not. It's a Windows API. It's not directly connected to Delphi.

Nevertheless, I for one, am interrested in having a cross-platform semaphores solution. I find them quite useful, specially after having the theory at the university.

What do others think about how such functionality could be implemented?

We could write a procedural interface with some functions like CreateSemaphore, OpenSemaphore, CloseSemaphore, etc. Also the 2 classical operations P and V (I don't remember the descriptive names for them)

And TSemaphore could be the handle passed by such functions, or a new type could be created to avoid confusion.

Ah, by the way, I am moving this discussion to fpc-devel, since it's more appropriate here.

thanks,

Felipe Monteiro de Carvalho

Reply by email

willem
to Felipe Monteiro de Carvalho

Hello,

i do fully agree with you.

Implementing Semaphores is very important.
So i hope someone will implement this.

regards

Felipe Monteiro de Carvalho wrote 35 lines
On 10/30/07, 12 12 wrote: > Why TSemaphore not implemented for Win32? > AFAIK TSemaphore is just an alias to different semaphore names on different unixes. So it would never work on Win32 by definition. > but CreateSemaphore present in Delphi! > No it's not. It's a Windows API. It's not directly connected to Delphi. Nevertheless, I for one, am interrested in having a cross-platform semaphores solution. I find them quite useful, specially after having the theory at the university. What do others think about how such functionality could be implemented? We could write a procedural interface with some functions like CreateSemaphore, OpenSemaphore, CloseSemaphore, etc. Also the 2 classical operations P and V (I don't remember the descriptive names for them) And TSemaphore could be the handle passed by such functions, or a new type could be created to avoid confusion. Ah, by the way, I am moving this discussion to fpc-devel, since it's more appropriate here. thanks,

Reply by email