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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,7897733b1978b6a4 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.15.41 with SMTP id u9mr395169pbc.3.1321549696643; Thu, 17 Nov 2011 09:08:16 -0800 (PST) Path: h5ni2067pba.0!nntp.google.com!news1.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nntp.club.cc.cmu.edu!feeder.erje.net!news2.arglkargh.de!news.mixmin.net!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Freezing a task Date: Thu, 17 Nov 2011 18:08:17 +0100 Organization: cbb software GmbH Message-ID: <1h1cdcbimf1ws.t4wnwfx0f9nq$.dlg@40tude.net> References: <32992849.648.1321544004241.JavaMail.geo-discussion-forums@vbmh5> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: uj8eDODkXPBoTj2NquW7bg.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news1.google.com comp.lang.ada:18953 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Date: 2011-11-17T18:08:17+01:00 List-Id: On Thu, 17 Nov 2011 17:53:46 +0100, stefan-lucks@see-the.signature wrote: > If you just want to freeze a task to ensure another more important task > isn't slowed down (and unfreeze when the other task is done) a MUCH more > elegant way to do this is to use task priorities. Maybe, however it would not work as the given example does I/O. Unless you have access to very high level OS priorities (which you normally don't) you won't be able to stop the system services, drivers and interrupt routines doing I/O the behalf of the task. Not that you really wanted it anyway... IMO, in probably 90% all cases playing with priorities is a bad idea. The rest 10% require a very careful upfront analysis. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de