| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Secondary thread / Guard-page excep |
Hello Mario!
Replying to a message of Mario Semo to Erik Huelsmann:
EH>> I did not install an exception handler for this secondary
EH>> thread, but the compiler's runtime-library does not seem to
EH>> install one for the main thread and does not seem to have
EH>> any problems in stack-expansion....
MS> the main thread's stack is preallocated.
Ok, that explains some of it...
MS> I use 1MB of not preallocated stack (allocation via guard page
MS> handling) for all threads != main thread. (without problems, using VACPP)
Ok, I thought it should be possible, but my compiler, as far as I now know,
does not install a handler for guard-page handling. It leaves it to the
system. (Stackhandling is not affected as I understood from you, since the
stack for thread 1 is commited.)
EH>> I could write an exception-handler that uses the
EH>> guardpage-system to expand the stack, but the operating
EH>> system is supposed to be able to do that itself...
MS> thats what i expect too.
MS> maybe you are NOT touching all bytes on the stack? (if i turn up
MS> stack-check, it could cause a problem here).
This could be a problem, but not as far as I know, since this is on the
call to a DLL, just pushing some parameters onto the stack (or within the
DLL, but I can't verify that).
MS> WARPED!, Mario
As I understood from Peter and you is that thread 1 stack is precommited, I
decided to follow the same policy for other threads for now.
There is another problem now: PMERR_ATOM_NOT_FOUND on WinRegisterClass.
AHAB is a previously succesfully created anchorblock.
cs is a variable of type CSTRING (a c-compatible string-type)
u is of type ULONG
callme is just there to verify the result of WinRegisterClass.
{at}ObjectWinProc is a pointer to a window-procedure for my self-defined object window.
WinName is a var of type CSTRING too, containing 'Thrd444Obj10'
The code is the following (in pascal):
cs:=WinName;
u:=WinGetLastError(AHAB);
if not bool(WinRegisterClass(AHAB,cs,{at}ObjectWinProc,0,4)) then
callme;
u:=WinGetLastError(AHAB);
On the second call to WinGetLastError the return value is 0x81017
(errorlevel: unrecoverable, error PMERR_ATOM_NOT_FOUND). This returnvalue
actually surprises me, since I did not create, nor did I use an atomtable.
How can it return this value?
Bye, Erik!
[TeamOS/2 NL]
preferred personal reactions through e-mail
[internet: ErikH{at}hcc-gron.idn.nl]
--- FleetStreet 1.14 NR
* Origin: ORIGINal messages, I like them (2:500/19.1929)SEEN-BY: 50/99 78/0 270/101 620/243 711/401 409 410 413 430 808 809 934 955 SEEN-BY: 712/407 515 517 628 713/888 800/1 7877/2809 @PATH: 500/19 9 28/777 2/777 396/1 270/101 712/515 711/808 809 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.