Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!agate!pasteur!ames!lll-winken!uunet!mcvax!inria!blueberry!shapiro From: shapiro@blueberry.inria.fr (Marc Shapiro) Newsgroups: comp.lang.c++ Subject: Re: Some problems in the task class Keywords: task, bugs Message-ID: <1270@inria.inria.fr> Date: 24 Apr 89 07:17:47 GMT Sender: news@inria.inria.fr Reply-To: shapiro@sor.inria.fr (Marc Shapiro) Organization: Institut National de Recherche en Informatique et Automatique -- Rocquencourt, France Lines: 39 In article <810@eiger.iis.UUCP> prl@iis.UUCP (Peter Lamb) writes: > >I have a number of problems with the task class as distributed >with AT&T 1.2.1 cfront. We still use the 1.1 version but apparently there are no significant differences. >2) The routines task::save() and task::restore() do not save/restore > the register state (apart from SP, FP and AP). This means that if > you use register variables in tasks (or functions called from tasks) > you may get surprising results. > A half-fix for this is easy, but a real fix is difficult. > A good, portable (but potentially expensive) fix for this exists: use setjmp/longjmp in task::task and task::schedule. You do a longjmp to where you already are just so it saves the registers. There is another bug you didn't list: if a task contructor creates more tasks, everything breaks. (I forget the reason for this.) >I would be interested in hearing from anyone who has successfully >used the task library from cfront 1.2 for any non-trivial programs, >and what problems they have had and/or fixed. We use it for a fairly big OS kernel. We had to fix a few things along the way (especially register save/restore of course) but I can't give you a whole lot of information as the people who did this have left the group. Marc Shapiro Marc Shapiro INRIA, B.P. 105, 78153 Le Chesnay Cedex, France. Tel.: +33 (1) 39-63-53-25 e-mail: , or: <...!uunet!inria!shapiro>, or (from some non-standard US sites):