[Lazarus] PostMessage return value

Xiangrong Fang xrfang at gmail.com
Wed Sep 17 16:51:22 CEST 2014

2014-09-17 16:09 GMT+08:00 Michael Schnell <mschnell at lumino.de>:

> Here you are.

It is strange that it works on one computer but does not work (or partially
work) on another -- causing SIGSEGV.  Both running same environment -
Ubuntu 14.04 x86_64 fpc 2.6.4 laz1.2.4.

I don't understand how the critical section works.   I try to write a test
program, which does the following:

The main thread create a predefined number of threads, which start running
on creation. The thread's wait for a critical section variable, when
acquired, try to crack a given integer, see if it is prime number or not,
report back to main thread about the result and get the next number to
crack from main thread.  The main thread output crack result of every
thread in a memo box.

I simply don't know how to coordinate the threads. And got many strange
errors like

Semaphore init failed (maybe too many running threads)?

something wrong in raise.c, laz asked me if I want to locate myself,

May I send you my source, or you can write a demo for me?  Thanks a lot!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20140917/6db890f7/attachment-0003.html>

More information about the Lazarus mailing list