From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,dc094c5990573c85 X-Google-Attributes: gid103376,public From: "Theodore E. Dennison" Subject: Re: Program_Error from library level task declaration... Date: 1996/07/30 Message-ID: <31FE562A.237C228A@escmail.orl.mmc.com>#1/1 X-Deja-AN: 171104173 references: <4td2pg$2i9@goanna.cs.rmit.edu.au> content-type: text/plain; charset=us-ascii organization: Lockheed Martin Information Systems mime-version: 1.0 newsgroups: comp.lang.ada x-mailer: Mozilla 2.0 (X11; I; SunOS 4.1.3_U1 sun4m) Date: 1996-07-30T00:00:00+00:00 List-Id: Dale Stanbrough wrote: > I've tried to create a library level semaphore to be used > for screen locking. The semaphore is the standard implementation > using a task (yes, I know a protected object would be better). > > The declaration is... > > with semaphores; use semaphores; > package screen_lock is > > screen:semaphore; > > end screen_lock; > ... > However this causes a program_error. I'm at a bit of a loss as > to how to fix this. Does anyone have any bright ideas? It would help to see the code for "semaphores" as well. Typically, I see program error when, o Someone tries to rendezvous with a task that has terminated. o The code depends on the order of package elaboration (and the compiler guesses wrong). o A function reaches the "end" without executing a "return" statement. (Note that if the "semaphore" task contains a terminate alternative, the task may terminate once your main task terminates.) -- T.E.D. | Work - mailto:dennison@escmail.orl.mmc.com | | Home - mailto:dennison@iag.net | | URL - http://www.iag.net/~dennison |