CWPLCAP%PACEVM.BITNET@cunyvm.cuny.edu (Anthony Passante) (06/16/89)
Dear Relay, I am desperately trying to write a simple program that will create two simultaniously running tasks that share a few variables. I have read through the ROM Kernal Manual and also the manuals by Mortimere and Peck but still cannot seen to get it working correctly. I haven't found any example code in these manuals to assist me. If there is anyone out there that knows how to do this or has a written piece of code that they can send to me, I would greatly appreciate it. Program Explination: The program is a simulation of a Bounded Buffer. The main program creates a structure with a lower bound of 0 and an upper bound of 10. Its initial value is set to 5. Then, two tasks are created. One task adds to the buffer while the other task takes from it. I tried to get this working for a few weeks but could not get the tasks to run at the same time. Again, if you know how to spawn concurrently running tasks, please send me the explination or example code. thanks, Tony
kevin@uts.amdahl.com (Kevin Clague) (06/18/89)
In article <17835@louie.udel.EDU> CWPLCAP%PACEVM.BITNET@cunyvm.cuny.edu (Anthony Passante) writes: >Dear Relay, > >I am desperately trying to write a simple program that will create two >simultaniously running tasks that share a few variables. I have read >through the ROM Kernal Manual and also the manuals by Mortimere and Peck >but still cannot seen to get it working correctly. I haven't found any >example code in these manuals to assist me. If there is anyone out there >that knows how to do this or has a written piece of code that they can >send to me, I would greatly appreciate it. The standard answer to this is: Look on the Fish Disks.... presuming you have them. I just released a multitasking Mandelbrot program (source and all) to the Fish Disks and comp.sources.amiga. If Bob Page would stop having a good time at devcon and release my stuff, you would have examples sources. :-) Seriously... rather than waid through the 400K bytes source (look in tasks.c), just look at examples on the fishs disks. Leo wrote some simple multitasking examples years ago. I believe Matt Dillon has some examples of multitasking and task coordination as well. Books are fine... but give me some working examples and I do better. The best place to find examples is the Fish Disks. > >I tried to get this working for a few weeks but could not get the tasks >to run at the same time. Again, if you know how to spawn concurrently >running tasks, please send me the explination or example code. Technically the two tasks can't be running at the same time (i.e. the 68000 can only be running one task at a time.) but this is probably not what you mean. How do you know that they are not running at the same time? Maybe they are, and something else is wrong. > >thanks, Tony Email me if you can't find examples on the Fish Disks. Kevin -- UUCP: kevin@uts.amdahl.com or: {sun,decwrl,hplabs,pyramid,seismo,oliveb}!amdahl!kevin DDD: 408-737-5481 USPS: Amdahl Corp. M/S 249, 1250 E. Arques Av, Sunnyvale, CA 94086 [ Any thoughts or opinions which may or may not have been expressed ] [ herein are my own. They are not necessarily those of my employer. ]