From: "Aaron Case" <aaron.case@dynazign.com>
To: "Gary Thomas" <gary@mlbassoc.com>
Cc: "Ecos-Discuss" <ecos-discuss@sources.redhat.com>
Subject: RE: [ECOS] context for creating interrupts on edb7312
Date: Fri, 21 Nov 2003 18:28:00 -0000 [thread overview]
Message-ID: <GBEOKKOEOGFDMKDFCHIMIEOFCAAA.aaron.case@dynazign.com> (raw)
In-Reply-To: <1069435708.1961.726.camel@hermes>
Aaron Case<aaron.case@dynazign.com>
Firmware Engineer
Dynazign, Inc.
Charlotte, USA
> -----Original Message-----
> From: Gary Thomas [mailto:gary@mlbassoc.com]
> Sent: Friday, November 21, 2003 12:28 PM
> To: Aaron Case
> Cc: Ecos-Discuss
> Subject: RE: [ECOS] context for creating interrupts on edb7312
>
>
> On Fri, 2003-11-21 at 10:22, Gary Thomas wrote:
> > On Fri, 2003-11-21 at 09:32, Aaron Case wrote:
> > > > >
> > > > > Im looking for something along the lines of #define
> > > > hal_interrupts_enable
> > > > > cyg_interrupt_enable().
> > > >
> > > > Actually, there is no explicit call like this (anymore). Interrupts
> > > > will get enabled when the scheduler "starts" the first
> thread (minimally
> > > > the 'idle' thread). Thread contexts are initialized with interrupts
> > > > enabled and this just sort of falls out with the washing :-)
> > > >
> > > > --
> > > > Gary Thomas <gary@mlbassoc.com>
> > > > MLB Associates
> > > >
> > > >
> > >
> > > Gary,
> > >
> > > Thanks for the prompt answer. I was speaking more in the
> context of linking
> > > and compiling the image.
> > >
> > > I see that a call to enable interrupts is not necessary when
> threads are
> > > initialized.
> > >
> > > I also see the cyg_interrupt_enable in the map file, which
> jumps to the
> > > hal_interrupts_enable( from vector.S but not in the map file)
> code in the
> > > application.
> >
> > I'm not sure I understand what you mean by this (in the map file?), but
> > if a function isn't used (cyg_interrupt_enable() is not used by the
> > kernel except for a single test), then even if that function is defined
> > it doesn't end up in the resulting application.
> >
> > IMO there is absolutely no need to ever call cyg_interrupt_enable(),
> > except for the kernel test which tests it.
> >
> > If you need to manipulate the interrupt state (and there are very few
> > cases even for this), this is a better approach:
> >
> > cyg_uint32 state;
> > HAL_DISABLE_INTERRUPTS(state); // Disables interrupts
> > ...
> > HAL_RESTORE_INTERRUPTS(state); // Restore interrupts
>
> Or, even better when writing device drivers:
>
> cyg_drv_isr_lock();
> ...
> cyg_drv_isr_unlock();
>
> --
> Gary Thomas <gary@mlbassoc.com>
> MLB Associates
>
>
Ok, Ive got it worked out now.
Thanks,
Aaron Case
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss
next prev parent reply other threads:[~2003-11-21 18:28 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-19 16:34 Aaron Case
2003-11-19 19:36 ` Gary Thomas
2003-11-19 20:22 ` Aaron Case
2003-11-19 22:18 ` Gary Thomas
2003-11-20 14:25 ` Aaron Case
2003-11-20 14:35 ` Gary Thomas
2003-11-20 15:01 ` Aaron Case
2003-11-20 15:21 ` Gary Thomas
2003-11-21 15:06 ` Aaron Case
2003-11-21 15:55 ` Gary Thomas
2003-11-21 16:32 ` Aaron Case
2003-11-21 17:22 ` Gary Thomas
2003-11-21 17:28 ` Gary Thomas
2003-11-21 18:28 ` Aaron Case [this message]
2003-11-19 16:50 amassa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=GBEOKKOEOGFDMKDFCHIMIEOFCAAA.aaron.case@dynazign.com \
--to=aaron.case@dynazign.com \
--cc=ecos-discuss@sources.redhat.com \
--cc=gary@mlbassoc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).