From 38684fe9c14d4eae4ad277515276ac88b24410ef Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Sun, 5 Oct 2008 13:53:36 +0000 Subject: [PATCH] 2008-10-05 15:53 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/source/vm/thread.c ! fixed hb_mutexSubscribe*() in ST mode --- harbour/ChangeLog | 4 ++++ harbour/source/vm/thread.c | 22 ++++++++++++++++------ 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 2bb9daba0e..d0557fcb37 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,10 @@ 2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2008-10-05 15:53 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/source/vm/thread.c + ! fixed hb_mutexSubscribe*() in ST mode + 2008-10-05 03:29 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/tests/speedtst.prg + added support for multiple usage of --exclude parameter diff --git a/harbour/source/vm/thread.c b/harbour/source/vm/thread.c index 47557c5b58..e86cf58a5d 100644 --- a/harbour/source/vm/thread.c +++ b/harbour/source/vm/thread.c @@ -1346,9 +1346,14 @@ HB_FUNC( HB_MUTEXSUBSCRIBE ) else pResult = hb_threadMutexSubscribe( pItem, FALSE ); - hb_itemParamStoreForward( 3, pResult); - hb_itemRelease( pResult ); - hb_retl( pResult != NULL ); + if( pResult ) + { + hb_itemParamStoreForward( 3, pResult ); + hb_itemRelease( pResult ); + hb_retl( TRUE ); + } + else + hb_retl( FALSE ); } } @@ -1371,9 +1376,14 @@ HB_FUNC( HB_MUTEXSUBSCRIBENOW ) else pResult = hb_threadMutexSubscribe( pItem, TRUE ); - hb_itemParamStoreForward( 3, pResult); - hb_itemRelease( pResult ); - hb_retl( pResult != NULL ); + if( pResult ) + { + hb_itemParamStoreForward( 3, pResult ); + hb_itemRelease( pResult ); + hb_retl( TRUE ); + } + else + hb_retl( FALSE ); } }