[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference hydra::amiga_v1

Title:AMIGA NOTES
Notice:Join us in the *NEW* conference - HYDRA::AMIGA_V2
Moderator:HYDRA::MOORE
Created:Sat Apr 26 1986
Last Modified:Wed Feb 05 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:5378
Total number of notes:38326

3497.0. "Task vs. Process vs. ???" by WHAMMY::SPODARYK (Binary Throttle) Mon Feb 19 1990 12:58

Since the Amiga gives us such a nice multitasking environment, I'd like to
take advantage of it from within a program.

From what I've read - there are two methods to do this: task and process.
A task would be great for what I need, but it doesn't allow I/O or AmigaDOS
calls from within.  A process isn't great since I would like the 'child'
to share resources with the 'parent', and don't want 2 seperate exectables.

What I really need is something like SYS$DCLAST - ie. Launch a routine
asynchronously given the routine name, a parameter, and a mode.  What I really 
want to do is create a 'task/process' to gather user input, while the 'parent'
continues it's calculations.  The two could communicate through a shared
MsgPort or (simpler) by using a small region of global memory.

Does a similar function exist?  I would certainly hope so.

Steve
T.RTitleUserPersonal
Name
DateLines
3497.1WJG::GUINEAUMon Feb 19 1990 16:4315
Have you looked into the EXEC CreateProc() function or Lattice C's fork()?

CreateProc() takes some creative hacking to get it to execute in the parent's
context...

Lattice's fork() isn't too good since it really doesn't match the Unix
version too well.

You might even check out IPC (Inter Process Communication) by Pete Goodeve 
and Peter da Silva on Fish #290.

If you really want $DCLAST behaviour (i.e. Software Interrupt) then check out
the EXEC interrupt handeling functions...

John
3497.2Thread?WHAMMY::SPODARYKBinary ThrottleMon Feb 19 1990 17:1214
I don't know what I was thinking but I don't really need $DCLAST.
(I've had AST's on the brain lately :^)
CreateProc() offers similar functionality to $CREPRC, but neither is
really what I need.

I need a task w/AmigaDOS functionality. (Perhaps a 'thread'?)

I think my best bet would be to make use of CreateProc() and pass 
messages to the 'parent'.  It's more work than I wanted to do, but
it's probably the best thing to do.  Will keep researching it.

Thanks,

Steve