public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Setting tty device interrupt priority, spltty()
@ 2001-09-07  2:20 Arif.Abbas
  2001-09-07  2:32 ` Andrew Lunn
  0 siblings, 1 reply; 2+ messages in thread
From: Arif.Abbas @ 2001-09-07  2:20 UTC (permalink / raw)
  To: ecos-discuss

Hi everyone!

		I want to be able to set a priority to the tty level
priority.
I saw that spl's such as splnet, splimp etc etc are defined in
tcpip/current/include/sys/param.h
as
#define splimp()   cyg_splimp(__FUNCTION__, __LINE__)
#define splnet()   cyg_splnet(__FUNCTION__, __LINE__)
#define splclock() cyg_splclock(__FUNCTION__, __LINE__)
#define splsoftnet() cyg_splsoftnet(__FUNCTION__, __LINE__)
#define splx(x)    cyg_splx(x, __FUNCTION__, __LINE__)

I also find the cyg_splxxx() functions in the file synch.c as

cyg_uint32
cyg_splxxx(SPLXARGS)
{
    SPLXTRACE;
    return spl_any( SPL_XXX );
}

where 
SPL_XXX is defined as 

#define SPL_IMP      0x01
#define SPL_NET      0x02
#define SPL_CLOCK    0x04
#define SPL_SOFTNET  0x08
#define SPL_INTERNAL 0x10

I am not sure on which priority to the tty device (the choices are 0x03 or
0x05-0x07 or to simply 
rearrange the prioritys)
Any suggestions??

Best Regards,
Arif Abbas

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ECOS] Setting tty device interrupt priority, spltty()
  2001-09-07  2:20 [ECOS] Setting tty device interrupt priority, spltty() Arif.Abbas
@ 2001-09-07  2:32 ` Andrew Lunn
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Lunn @ 2001-09-07  2:32 UTC (permalink / raw)
  To: Arif.Abbas; +Cc: ecos-discuss

> #define SPL_IMP      0x01
> #define SPL_NET      0x02
> #define SPL_CLOCK    0x04
> #define SPL_SOFTNET  0x08
> #define SPL_INTERNAL 0x10
> 
> I am not sure on which priority to the tty device (the choices are 0x03 or
> 0x05-0x07 or to simply 
> rearrange the prioritys)
> Any suggestions??

The OpenBSD stack uses priorites. The eCos implementation there is no
prioritisation. These are just bits in a flag and are used in
combination of a mutex to provide mutual exclusion.  So define you
SPL_TTY as 0x20 and add all the other function/macros as needed.

        Andrew

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-09-07  2:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-07  2:20 [ECOS] Setting tty device interrupt priority, spltty() Arif.Abbas
2001-09-07  2:32 ` Andrew Lunn

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).