Multitasking

How to access globals variables of one task from another?

Hi guys.

There's something I've been wondering. Is there some protocol in place for accessing global variables of another task in OS4 PPC code? Looking at examples code just accesses variables regardless.

In the 68K days we had things like geta4() type functions. Or just taking care of it yourself with a bit of ASM. But what about OS4?

I tend to be pedantic about these things and if I need pass data or modify it I tend to keep it inside an object that I send to another task. For example, in an interrupt, I would make use of the user data field to pass an object.

Forums: 

Simple multitasking communication

I am trying to write a simple multitasking communication function. Not quite there.

My program starts. SetUpProcesses() to start new process. I can't talk to it. I never get past IExec->WaitPort(). (The process is started.)

I just want to PutMsg() a simple message with a int32 value to tell it what to do, 1 through 99. -1 to quit. Or even send a text message, "start", "stop", "quit". A reply back that it's done would be nice, success or fail.

I based this off Thomas Rapp's multi3.c example. Tried to update it to OS4.

Can someone straighten me out?

Forums: 

Pipe programming

I am trying once again to make the
xPIPE event in Gui4Cl work as expected under OS4

My recent AllocSysObject question was about this ( in fact a program piper.c build of 'pipe related' gui4cli's component)

I struggle with

1. lack (did not find anyway ) of a working pipe's source.

Pipeviewer 0.4.5 is available on sourceforge as an Amiga program

but i did not find the corresponding source

http://www.ivarch.com/programs/sources/pv-1.5.7-1.src.rpm

Forums: 

How do I check for multiple instances of a program running from within a program?

There must be a very simple way to do this.

How can I have a program check to see if an instance of it is already running in OS4, using C? I want to prevent the possibility of multiple instances running at the same time.

Thanks!

Forums: 

Subscribe to RSS - Multitasking