TIP: Click on subject to list as thread! ANSI
echo: cis.os9.68000.osk
to: all
from: Paul N. Leonard 72477,774
date: 1995-11-17 15:40:26
subject: OS-9 Ver 3.0 Bug

#: 21271 S12/OS9/68000 (OSK)
    17-Nov-95  15:40:26
Sb: OS-9 Ver 3.0 Bug
Fm: Paul N. Leonard 72477,774
To: all

                     ////// OS-9 Version 3.0 BUG //////

     The tsleep() function behaves differently in version 3.0 than
     it prior to version 3.0,  and the result is very intermittent
     and can lock up your task.  We had created  a  macro  called
     hard_tsleep() to insure that we slept for a specified period.
     It worked fine before we started using OS-9 ver. 3.0.

     In  OS-9  version 3.0  tsleep(1)  returns  1,  not  0!  This
     causes the first macro below to loop endlessly. If you do any
     sort of checking for tsleep returning 0, you may want to keep
     this in mind.

     /* original version, works under OS-9 prior to version 3.0 */ #define
hard_tsleep(T)    { unsigned l; l=(T); while ((l=tsleep(l))!=0); }

     /* new version, overcomes bug in OS-9 version 3.0 */ #define
hard_tsleep(T)    { unsigned l; l=(T); while ((l=tsleep(l)) >1); }


  / Paul N. Leonard pnl@sgs.com / KE6PIJ Santa Clara ARES/RACES   /
 /_   Internet: pnl@sgs.com    /_ ke6pij@sgs.com                 /_
  /   CompuServe: 72477,774     / ke6pij@n0ary.#nocal.ca.usa.noam /

Press  !>

SOURCE: compuserve via textfiles.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™.