This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: regarding DSR
- From: Andrew Lunn <andrew at lunn dot ch>
- To: Mahesh <mahesh at cranessoftware dot com>
- Cc: radhakrishnan R <radhaamanji at yahoo dot co dot uk>,ecos <ecos-discuss at sources dot redhat dot com>
- Date: Tue, 21 Oct 2003 13:43:24 +0200
- Subject: Re: [ECOS] regarding DSR
- References: <1066730368.5820.11.camel@MAHESH>
On Tue, Oct 21, 2003 at 03:29:28PM +0530, Mahesh wrote:
> Hi,
> I am using Real time clock for alarms.
> My configuration is Arm pid and sid (simulator only)
> The alarm is being initialized in one thread and at the time the
> alarm triggers, i am in one more thread.The alarm is periodic.
> How i can go to the thread which initialized that alarm.Or can i put
> the part of code in DSR without going to that thread.The part of code i
> am talking consists of initializing alarms and sending messages to
> mailboxes.Is it permissible in DSR's.
You cannot do anything that can block in a DSR. Initializing an alarm
is OK. You have to be careful with sending a message to a
mbox. cyg_mbox_put() can block when the mbox is full. So instead you
have to use cyg_mbox_tryput() and if it fails because the message box
is full you cannot wait and try again.
All this is documented. So please RTM.
Andrew
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss