Saturday, December 16th 2017, 4:34am UTC+1

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

ads

Beginner

Date of registration: Feb 1st 2008

Posts: 1

1

Friday, February 1st 2008, 7:32pm

Event Usage in Embos

Hi,

I am new to the RTOS world. I am using emBos RTOS.3.32 with AustriMicroSystems chip and currently have a question regarding the usage of the event.

According to your user manual, each task can have up to 8 different events. Based on my understanding, if I have n tasks, I should be able to generate 8n events. However, what bothers me is that OS_WaitEvent() does not specify which event for a particular task has been signaled. Here is an example to describe my questions:

There are 4 tasks. Task1 has highest priority. Both Task1 and Task2 are waiting for an event to happen. The event mask is the same. Assume another function call OS_SignalEvent for the Task2 event1. My code is supposed to wake up CallAnother2() to perform some tasks. However, since CallAnother1() is waiting for the same event (is supposed to be from Task1) and has the higher priority, do you think your OS will wake up CallAnother1 first? If this is the case, it is not what I envisoned. And does that mean in any time, I cannot have more than 8 different events during the execution of my program?

Please help me on this. Thanks
ads has attached the following image:
  • example.GIF

SEGGER - Rolf

Super Moderator

Date of registration: Nov 21st 2007

Posts: 65

2

Saturday, February 2nd 2008, 11:02pm

Hi ADS,

there are 2 types of Events in embOS:
Task-specific events and Event objects, which are non-task specific.

It sounds like in your case, using Event objects (see chapter 10 of the user manual) would
be the right choice. embOS support an unlimited number of event objects (which need to be created
using OS_EVENT_Create) and allows any number of tasks to wait for an event Object.

Hope that helps!

Similar threads