Mail Archives: djgpp/2003/09/17/05:14:34
X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f
|
content-class: | urn:content-classes:message
|
MIME-Version: | 1.0
|
X-MimeOLE: | Produced By Microsoft Exchange V6.0.6249.0
|
Subject: | Problem with LWP2.0 of DJGPP
|
Date: | Wed, 17 Sep 2003 16:59:56 +0800
|
Message-ID: | <D3D296694D9B754EBAECD30EA277809005F575@smtp.atsex.asmpt.com>
|
X-MS-Has-Attach: | |
X-MS-TNEF-Correlator: | |
Thread-Topic: | Problem with LWP2.0 of DJGPP
|
Thread-Index: | AcN8+hEeI7QZp+5HRcOKt7wAqgiPVA==
|
From: | "Wang Yong" <ywang AT asmpt DOT com>
|
To: | <djgpp AT delorie DOT com>
|
X-OriginalArrivalTime: | 17 Sep 2003 08:59:59.0568 (UTC) FILETIME=[12CE3D00:01C37CFA]
|
X-MIME-Autoconverted: | from quoted-printable to 8bit by delorie.com id h8H9DHMu002393
|
Reply-To: | djgpp AT delorie DOT com
|
DJGPP version 2.03, GCC is 3.2.3.
The LWP packet is from v2tk/jtlwp20s.zip.
When compiling it, I get:
gcc -Wall -O2 -g -c lwp.c
gcc -Wall -O2 -g -c lwpasm.S
c:/djgpp/tmp/ccP8R9jb.s: Assembler messages:
c:/djgpp/tmp/ccP8R9jb.s:60: Warning: indirect ljmp without `*'
c:/djgpp/tmp/ccP8R9jb.s:85: Warning: indirect ljmp without `*'
c:/djgpp/tmp/ccP8R9jb.s:149: Warning: indirect jmp without `*'
ar rcs liblwp.a lwp.o lwpasm.o
gcc -Wall -O2 -g -o example1.exe example1.c liblwp.a dpmiint.S
gcc -Wall -O2 -g -o example2.exe example2.c liblwp.a dpmiint.S
gcc -Wall -O2 -g -o example3.exe example3.c liblwp.a dpmiint.S
gcc -Wall -O2 -g -o example4.exe example4.c liblwp.a dpmiint.S
When running the examples, under whatever OS (DOS or 2K/XP), in most cases, the result of example1 is:
MAIN
MAIN
MAIN
Exiting due to signal SIGSEGV
General Protection Fault at eip=00002ff5
eax=00000000 ebx=00000021 ecx=00000000 edx=00000000 esi=00000006 edi=00094178
ebp=00094154 esp=00094140 program=D:\TMP\CONTRIB\LWP\EXAMPLE1.EXE
cs: sel=01a7 base=01cc0000 limit=0009ffff
ds: sel=01af base=01cc0000 limit=0009ffff
es: sel=01b7 base=01cc0000 limit=0009ffff
fs: sel=017f base=000053f0 limit=0000ffff
gs: sel=01bf base=00000000 limit=0010ffff
ss: sel=01af base=01cc0000 limit=0009ffff
App stack: [00094270..00014270] Exceptn stack: [000141dc..0001229c]
Call frame traceback EIPs:
0x00002ff5
0x00007e4c
0x0000d22e
0x0000beb0
0x000062e2
0x00001960
0x00004a08
I modified the code of example1.c to remove mutex and added lwpEnterCriticalSection()/lwpLeaveCriticalSection() around printf() and lwpYield() in threads. Then with clean boot to ms-dos 6.22, it can run. But after I re-compile it, or just run some other applications, such as vim, if I run example1.exe again, it crashes as above.
Any suggestions from you are welcomed. Thank you very much!
BTW: Is there any other multitask/thread libraries for DJGPP v2.03 or above?
Sincerely,
Wang Yong
- Raw text -