[fpc-pascal] What to use when porting WaitForMultipleObjects to Linux?

Dmitry Boyarintsev skalogryz.lists at gmail.com
Mon May 16 14:42:22 CEST 2016


On Mon, May 16, 2016 at 6:22 AM, Bo Berglund <bo.berglund at gmail.com> wrote:

> When porting a Delphi console program on Windows to FreePascal on
> Linux, what can one do with API calls like WaitForMultipleObjects,
> which is used to synchronize processing between threads?
>

It depends if you're actually using WaitForMultipleObjects to sync with
*multiple* objects.
AFAIK, Posix API (implemented by Linux)  do not have any routine to
handle/sync multiple objects at the same.
Thus you might need to build something similar yourself.

The closest API in linux system is select() function, that can check the
status of multiple file-descriptors in one call. Some of file-descriptor
objects could be used for synchronization purposes.

thanks,
Dmitry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20160516/dd950047/attachment.html>


More information about the fpc-pascal mailing list