Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!mit-eddie!uw-beaver!tektronix!tekig!tekig4!brianr From: brianr@tekig4.UUCP Newsgroups: comp.sys.amiga Subject: Task spawning difficulties Message-ID: <1559@tekig4.TEK.COM> Date: Tue, 9-Jun-87 18:04:59 EDT Article-I.D.: tekig4.1559 Posted: Tue Jun 9 18:04:59 1987 Date-Received: Sat, 13-Jun-87 02:03:40 EDT Organization: Tektronix Inc., Beaverton, Or. Lines: 58 Keywords: CreateTask AddTask crash I am slowly working on a real live application for my Amiga, using Manx' Aztec C compiler (ver 3.40), and I'm having problems creating an independent task: during the call to the "AddTask" library function, the Amiga crashes (I can single-step the debugger 20 or 30 instructions into "AddTask"). I have produced a small test program, included below, which demonstrates this behavior. I posted it to Manx' BBS, but so far, nobody there has suggested a remedy. Can anyone point out my mistake? I apologize for posting such a non-contributory article, but I used up my Manx patience waiting for ver3.4. ---- program follows --- #include #include struct Task *myslave; USHORT total; #define KILLSIG 30L #define KILLFLAG 0x40000000L static void Countemup() { int i; geta4(); total = 300; if (AllocSignal (KILLSIG) != KILLSIG) goto dumpout; total = 0; Wait (KILLFLAG); for (i = 0; i < 20; i++) total += i; dumpout: RemTask (0L); } main() { if ((myslave = CreateTask("Force",22L,Countemup,1400L)) && total < 20) { printf ("We made a task. It has set total to %d.\n",total); Signal (myslave, KILLFLAG); printf ("After running the task, total becomes %d.\n",total); } else printf ("The task didn't spawn.\n"); } ------- end of program --- Thanks in advance, Brian Rhodefer ...tektronix!tekig4!brianr