Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!rochester!rutgers!lll-lcc!well!ewhac From: ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) Newsgroups: comp.sys.amiga Subject: Re: How do I force a context switch? Message-ID: <3663@well.UUCP> Date: Mon, 3-Aug-87 05:04:45 EDT Article-I.D.: well.3663 Posted: Mon Aug 3 05:04:45 1987 Date-Received: Tue, 4-Aug-87 01:49:20 EDT References: <5175@utcsri.UUCP> <2609@hoptoad.uucp> Reply-To: ewhac@well.UUCP (Leo (My glasses have gate arrays) Schwab) Distribution: world Organization: Chrysler/GM, Makers of the 6000 SUX. Lines: 34 Summary: Nah, you want to use the tools already there. [ Invest in OCP. You have 20 seconds to comply. ] In article <2609@hoptoad.uucp> farren@hoptoad.UUCP (Mike Farren) writes: >In article <5175@utcsri.UUCP> flaps@utcsri.UUCP (Alan J Rosenthal) writes: >> >> I'm writing a program where several tasks are started. >>Through use of priorities, all are started at once. One of these >>functions sets a global variable that others need. If through bad luck >>another function starts running first and tries to use this global >>variable before it's set, it has to allow the first function to set it >>before proceeding. > >Seems to me that relying on the scheduling algorithm in EXEC to synchronize >your tasks is a dangerous and losing proposition. Why not have the main >task Wait() until the first sub-task has set its global before launching >the rest of the sub-tasks? [ ... ] Sounds to me like a classic application for semaphores, which the Amiga has. No, I don't know how they work exactly. Would anyone at CATS care to clarify their use? _-_-_-_-_-_-_-_-_-_ Old signature used as 'inews' filler. _-_-_-_-_-_-_-_-_-_ ________ ___ Leo L. Schwab \ /___--__ The Guy in The Cape ___ ___ /\ ---##\ ihnp4!ptsfa!well!ewhac / X \_____ | __ _---)) ..or.. / /_\-- -----+==____\ // \ _ well ---\ ___ ( o---+------------------O/ \/ \ dual ----> !unicom!ewhac \ / ___ \_ (`o ) hplabs -/ ("AE-wack") ____ \___/ \_/ Recumbent Bikes: "Work FOR? I don't work FOR The _O_n_l_y Way To Fly! anybody! I'm just having fun."