From: Sergey Kirpa Newsgroups: comp.os.msdos.djgpp Subject: Bug in Palantir-0.4.2 Date: Sat, 16 May 1998 11:54:42 +0300 Organization: Lucky Net Ltd. Lines: 72 Message-ID: <355D5452.B707020@zfs.lg.ua> NNTP-Posting-Host: zfs.lg.ua Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------058491D05FF4EFA1EACD7416" To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk This is a multi-part message in MIME format. --------------058491D05FF4EFA1EACD7416 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable I found strange bug in multitasking library Palantir-0.4.2. A small example wich test this bug attached too. Note: Before compile this test you mast uncomment line 140,141 and 142 in file allegro/src/djgpp/timer.c, and build liballeg.a again. -- =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 ,,, =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0 (.~.) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= --oOO--(_)--OOo--=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D ????? ?.?.=A0=A0 kirpa AT zfs DOT lg DOT ua =A0 --------------058491D05FF4EFA1EACD7416 Content-Type: text/plain; charset=us-ascii; name="Ex2.c" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="Ex2.c" #include #include void test_bug() { for (;;) if (_lwp_enable) { printf("BUG !!!\n"); _lwp_enable = 0; } } void proc(void *arg) { _lwp_enable = 1; printf("Proc\n"); _lwp_enable = 0; test_bug(); } void timer(void *arg) { for (;;) { lwp_spawn(proc, 4096, 1, 0, 0); lwp_sleep(1, 0); } } int main(void) { clrscr(); if (palantir_init(0) == FALSE) { printf("Error: Palantir initialization failed\n"); return 1; } lwp_spawn(timer, 4096, 1, 0, 0); test_bug(); return 0; } --------------058491D05FF4EFA1EACD7416--