On Thu, 19 Feb 2009, Maurilio Longo wrote:

Hi Maurilio,

> Ok, now it works, all mttest?? do work ok and even speedtst --thread=40
> reaches the end.
> Thank you so much!

Thank you for confirmation. Now it should work keeping the exact pthreads
semantic but there is one important note for developers which want
to use hb_threadCond{Singnal|Broadcast}() functions. They have to be
called protected by the mutex used in hb_threadCond[Timed]Wait().
Some pthreads implementation also have such limitation. I can eliminate
it but with the cost of aditonal mutex which will slow down the whole
code so I'd preffer to keep it as it and document the current behavior.
It should not be big problem for anyone. In 99% of cases it's important
to only check the order of instruction and instead of:
   hb_threadLeaveCriticalSection();
   hb_threadCondSignal();
programer always have to use:
   hb_threadCondSignal();
   hb_threadLeaveCriticalSection();

This last typo was a mistake in my previous fix:
Instead of:
      if( pWaiting == cond->waiters )
         cond->waiters = NULL;
I wrote:
      if( pWaiting == cond->waiters )
         pWaiting = NULL;

Grrr... Enough. It's time to make some other thing for few weeks.
I hope that nothing critical will appear. Please make some tests
with OS2 builds and if you will find anything else then please
inform me.

best regards,
Przemek
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to