Based in your explanation, fails trying to execute
iKey = HB_GTSELF_READKEY( pGT, INKEY_ALL );
---> hb_gt_os2_ReadKey()
but never execute it
Second thread can not access this "low level GT driver READKEY()
method (
GTOS2:hb_gt_os2_ReadKey() ) ?
What is very strange and should not happen.
I'd rather expect that there is sth wrong with tests we are making.
Can you add:
printf("0. hb_gt_cgi_ReadKey()\r\n");fflush(stdout);
to GTCGI hb_gt_cgi_ReadKey() function and send the ouput for test
program linked with GTCGI together with GTOS2?
Entire results for HB_GT_OS2_DEFAULT, HB_GT_CGI_DEFAULT,
HB_GT_STD_DEFAULT are below
HB_GT_OS2_DEFAULT and HB_GT_STD_DEFAULT should fail equal, but STD does
a step ahead (??)
As summary:
HB_GT_OS2_DEFAULT
=================
... thread 2
1. hb_gt_def_InkeyPoll()
2. hb_gt_def_InkeyPoll()
1. hb_gt_def_InkeyPollDo()
SYS1808:
The process has stopped. The software diagnostic
code (exception code) is 0001.
printf("1. hb_gt_def_InkeyPollDo()\r\n");fflush(stdout);
iKey = HB_GTSELF_READKEY( pGT, INKEY_ALL );
printf("2. hb_gt_def_InkeyPollDo()\r\n");fflush(stdout);
HB_GT_CGI_DEFAULT
=================
... thread 2
1. hb_gt_def_InkeyPoll()
2. hb_gt_def_InkeyPoll()
1. hb_gt_def_InkeyPollDo()
0. hb_gt_cgi_ReadKey() <-------
2. hb_gt_def_InkeyPollDo()
...
HB_GT_STD_DEFAULT
=================
... thread 2
1. hb_gt_def_InkeyPoll()
2. hb_gt_def_InkeyPoll()
1. hb_gt_def_InkeyPollDo()
0. hb_gt_std_ReadKey() <------- (???)
SYS1808:
The process has stopped. The software diagnostic
code (exception code) is 0001.
These are code sections for OS2 and STD:
-------------------
static int hb_gt_os2_ReadKey( PHB_GT pGT, int iEventMask )
{
int ch; /* next char if any */
printf("0. hb_gt_os2_ReadKey()\r\n");fflush(stdout);
HB_TRACE(HB_TR_DEBUG, ("hb_gt_os2_ReadKey(%p,%d)", pGT, iEventMask));
printf("1. hb_gt_os2_ReadKey()\r\n");fflush(stdout);
/* zero out keyboard event record */
memset( s_key, 0, sizeof( KBDKEYINFO ) );
printf("2. hb_gt_os2_ReadKey()\r\n");fflush(stdout);
/* Get next character without wait */
KbdCharIn( s_key, IO_NOWAIT, ( HKBD ) * s_hk );
-------------------
static int hb_gt_std_ReadKey( PHB_GT pGT, int iEventMask )
{
PHB_GTSTD pGTSTD;
int ch = 0;
printf("0. hb_gt_std_ReadKey()\r\n");fflush(stdout);
HB_TRACE(HB_TR_DEBUG, ("hb_gt_std_ReadKey(%p,%d)", pGT, iEventMask));
HB_SYMBOL_UNUSED( iEventMask );
pGTSTD = HB_GTSTD_GET( pGT );
#if defined( HB_OS_UNIX_COMPATIBLE ) || defined( __DJGPP__ )
-------------------
David Macias
HB_GT_OS2_DEFAULT
=================
_hb_gettid()
TID=1
1. hb_inkeyPoll()
1. hb_threadMutexLock()
_hb_gettid()
TID=1
_hb_gettid()
TID=1
2. hb_threadMutexLock()
2. hb_inkeyPoll()
3. hb_inkeyPoll()
1. hb_gt_def_InkeyPoll()
2. hb_gt_def_InkeyPoll()
1. hb_gt_def_InkeyPollDo()
0. hb_gt_os2_ReadKey() <--------
1. hb_gt_os2_ReadKey()
2. hb_gt_os2_ReadKey()
3. hb_gt_os2_ReadKey()
4. hb_gt_os2_ReadKey()
1. hb_gt_def_MouseReadKey()
2. hb_gt_def_MouseReadKey()
5. hb_gt_os2_ReadKey()
2. hb_gt_def_InkeyPollDo()
3. hb_gt_def_InkeyPoll()
4. hb_inkeyPoll()
_hb_gettid()
TID=1
5. hb_inkeyPoll()
6. hb_inkeyPoll()
1. hb_threadMutexLock()
_hb_gettid()
TID=1
_hb_gettid()
TID=1
2. hb_threadMutexLock()
_hb_gettid()
TID=1
1. hb_inkeyPoll()
1. hb_threadMutexLock()
_hb_gettid()
TID=2
_hb_gettid()
TID=2
2. hb_threadMutexLock()
2. hb_inkeyPoll()
3. hb_inkeyPoll()
1. hb_gt_def_InkeyPoll()
2. hb_gt_def_InkeyPoll()
1. hb_gt_def_InkeyPollDo()
SYS1808:
The process has stopped. The software diagnostic
code (exception code) is 0001.
HB_GT_CGI_DEFAULT
=================
_hb_gettid()
TID=1
1. hb_inkeyPoll()
1. hb_threadMutexLock()
_hb_gettid()
TID=1
_hb_gettid()
TID=1
2. hb_threadMutexLock()
2. hb_inkeyPoll()
3. hb_inkeyPoll()
1. hb_gt_def_InkeyPoll()
2. hb_gt_def_InkeyPoll()
1. hb_gt_def_InkeyPollDo()
0. hb_gt_cgi_ReadKey() <------
2. hb_gt_def_InkeyPollDo()
3. hb_gt_def_InkeyPollDo()
4. hb_gt_def_InkeyPollDo()
3. hb_gt_def_InkeyPoll()
4. hb_inkeyPoll()
_hb_gettid()
TID=1
5. hb_inkeyPoll()
6. hb_inkeyPoll()
1. hb_threadMutexLock()
_hb_gettid()
TID=1
_hb_gettid()
TID=1
2. hb_threadMutexLock()
_hb_gettid()
TID=1
1. hb_inkeyPoll()
1. hb_threadMutexLock()
_hb_gettid()
TID=2
_hb_gettid()
TID=2
2. hb_threadMutexLock()
2. hb_inkeyPoll()
3. hb_inkeyPoll()
1. hb_gt_def_InkeyPoll()
2. hb_gt_def_InkeyPoll()
1. hb_gt_def_InkeyPollDo()
0. hb_gt_cgi_ReadKey() <-------
2. hb_gt_def_InkeyPollDo()
3. hb_gt_def_InkeyPollDo()
4. hb_gt_def_InkeyPollDo()
3. hb_gt_def_InkeyPoll()
4. hb_inkeyPoll()
_hb_gettid()
TID=2
5. hb_inkeyPoll()
6. hb_inkeyPoll()
1. hb_threadMutexLock()
_hb_gettid()
TID=2
_hb_gettid()
TID=2
2. hb_threadMutexLock()
_hb_gettid()
TID=2
_hb_gettid()
TID=2
_hb_gettid()
TID=2
_hb_gettid()
TID=2
1. hb_threadMutexLock()
_hb_gettid()
TID=1
_hb_gettid()
TID=1
2. hb_threadMutexLock()
_hb_gettid()
TID=1
HB_GT_STD_DEFAULT
=================
_hb_gettid()
TID=1
1. hb_inkeyPoll()
1. hb_threadMutexLock()
_hb_gettid()
TID=1
_hb_gettid()
TID=1
2. hb_threadMutexLock()
2. hb_inkeyPoll()
3. hb_inkeyPoll()
1. hb_gt_def_InkeyPoll()
2. hb_gt_def_InkeyPoll()
1. hb_gt_def_InkeyPollDo()
0. hb_gt_std_ReadKey() <-------
2. hb_gt_def_InkeyPollDo()
3. hb_gt_def_InkeyPoll()
4. hb_inkeyPoll()
_hb_gettid()
TID=1
5. hb_inkeyPoll()
6. hb_inkeyPoll()
1. hb_threadMutexLock()
_hb_gettid()
TID=1
_hb_gettid()
TID=1
2. hb_threadMutexLock()
_hb_gettid()
TID=1
1. hb_inkeyPoll()
1. hb_threadMutexLock()
_hb_gettid()
TID=2
_hb_gettid()
TID=2
2. hb_threadMutexLock()
2. hb_inkeyPoll()
3. hb_inkeyPoll()
1. hb_gt_def_InkeyPoll()
2. hb_gt_def_InkeyPoll()
1. hb_gt_def_InkeyPollDo()
0. hb_gt_std_ReadKey()
SYS1808:
The process has stopped. The software diagnostic
code (exception code) is 0001.
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour