Link to home
Start Free TrialLog in
Avatar of naseeam
naseeamFlag for United States of America

asked on

Can a task call function implemented in another task ?

Hello, we are using Keil's RTX Real-Time Operating System.

In this OS or in a typical OS, can a task call function defined in another task ?
Avatar of evilrix
evilrix
Flag of United Kingdom of Great Britain and Northern Ireland image

By "task" do you mean different process?
Avatar of naseeam

ASKER

Yes
Ok, then I guess what you're really talking about is interprocess communication. In other words, one process instructing another to perform some action, right?

The answer will really depend on the Operating System's system API. For example, Unix generally implements RCP using Unix pipes. Windows, on the oher hand, will use other methods (although it, too, has a concept of pipes).

I'm not sure if this helps but if it doesn't maybe you could add some context to your question; mostly, what is it you are trying to achieve?
as far as i could see from

http://www.keil.com/support/man/docs/rlarm/rlarm_ar_artxarm.htm

tasks would run an infinite loop and wait for events. so if you want to call a function of task2 from task1 you would trigger an event which was detected by task2 and task2 would process the requested function. there are a lot of samples in the above site which should help you.

Sara
Avatar of naseeam

ASKER

>>  function of task2

What is functions of task2.  Do you mean there is a funtion defined inside task.  I don't think that's possible.
Avatar of naseeam

ASKER

>>  what is it you are trying to achieve

From task1, I was calling a function.
From task1, I need to call this function through task 2.
ASKER CERTIFIED SOLUTION
Avatar of sarabande
sarabande
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of naseeam

ASKER

>>  Sara

I think you are explaning how to setup simple application using Keil real time operating system.
I think you are explaning how task communicate with each other using events.

My question is "Can a task call function implemented in another task."  I realize this question doesn't make sense because functions aren't implemented inside tasks.