mutexes and semaphores.

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

mutexes and semaphores.

Andreas Berger
In order to implement threading in DOS I will need to use some type of
mutex, but would like to implement it the FPC way.

Does FPC implement platform independent mutexes and/or semaphores? Or
must each platform use it's own OS specific versions?

Regards,
Andreas

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: mutexes and semaphores.

Пётр Косаревский
AB> In order to implement threading in DOS I will need to use some type of
AB> mutex, but would like to implement it the FPC way.

AB> Does FPC implement platform independent mutexes and/or semaphores? Or
AB> must each platform use it's own OS specific versions?

Michael Van Canneyt can answer this question, there are some parts in
FCL approaching OS independence.

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: mutexes and semaphores.

Michael Van Canneyt
In reply to this post by Andreas Berger


On Sun, 16 Jul 2006, Andreas Berger wrote:

> In order to implement threading in DOS I will need to use some type of mutex,
> but would like to implement it the FPC way.

There is no "FPC way" :-)

> Does FPC implement platform independent mutexes and/or semaphores? Or must
> each platform use it's own OS specific versions?

Each platform currently uses it's own OS specific version.

For FPC, it should be enough to implement RTLCiticalSection support,
using the thread manager. The Syncobjs unit in the FCL uses that to
implement classes which can be used as a mutex.

Michael.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal