🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #13447

Re: Need help with CreateTask under Lattice

#13447
From: Chuck McManis
Date: Fri, 12 Jan 1990 23:57
25 lines
1990 bytes
In article <12631@cbnewsc.ATT.COM> (gregg.g.wonderly) writes:
>I am trying to parallelize some I/O intensive code (device to device
>I/O) by using separate tasks to do the I/O.  I thought it should be
>trival to just put the __saveds modifier on the destination function
>for the new task and launch it (after the appropriate set up).
>However, I run into problems on the first function call out of the new
>tasks startup function.  This leads me to believe that not everything
>is sane with the stack and data pointers.

The key thing to remember with Tasks is _NO DOS CALLS_ are allowed. That
means generally anything in the C library that does I/O or calls to things
like Delay(). If you want to do DOS calls you will have to make Processes
instead of Tasks. Also you need to make sure you don't get stack checking
code in your procedure header but I think that the __saveds keyword does
this for you. Next question, how did you set up the task? Did you use
CreateTask() in amiga.lib ? Or did you roll your own ? Note that CT in 
Amiga.lib will Add your task for you automatically. Don't re add it or 
you will find yourself multithreading with the same stack, a nasty situation.


 
--Chuck McManis
uucp: {anywhere}!sun!cmcmanis   BIX: cmcmanis  ARPAnet: cmcmanis@Eng.Sun.COM
These opinions are my own and no one elses, but you knew that didn't you.
"If it didn't have bones in it, it wouldn't be crunchy now would it?!"
Technical Details
Message-ID: <130202@sun.Eng.Sun.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!zaphod.mps.ohio-state.edu!usc!apple!sun-barr!newstop!sun!stpeter!cmcmanis
References: <12631@cbnewsc.ATT.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!zaphod.mps.ohio-state.edu!usc!apple!sun-barr!newstop!sun!stpeter!cmcmanis
From: cmcmanis@stpeter.Sun.COM (Chuck McManis)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Need help with CreateTask under Lattice
Keywords: lattice createtask
Message-ID: <130202@sun.Eng.Sun.COM>
Date: 12 Jan 90 23:57:13 GMT
References: <12631@cbnewsc.ATT.COM>
Sender: news@sun.Eng.Sun.COM
Reply-To: cmcmanis@sun.UUCP (Chuck McManis)
Organization: Sun Microsystems, Mountain View
Lines: 25