This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Two TCP/IP stack issues...
- To: ecos-discuss at sources dot redhat dot com
- Subject: Re: [ECOS] Two TCP/IP stack issues...
- From: Nick Garnett <nickg at cygnus dot co dot uk>
- Date: 12 Apr 2000 11:36:06 +0100
- Newsgroups: cygnus.sourceware.ecos.d
- Organization: Cygnus Solutions, a Red Hat company (Cambridge, UK)
- References: <XFMail.000411151056.gthomas@redhat.com> <20000412063703.23936.qmail@daffy.airs.com>
Ian Lance Taylor <ian@zembu.com> writes:
> Date: Tue, 11 Apr 2000 15:10:56 -0600 (MDT)
> From: Gary Thomas <gthomas@redhat.com>
>
> Indeed, the correct solution will need to use proper kernel synchronizers.
> We'll need to look at this more closely to determine a proper solution.
>
> RTEMS uses a single semaphore for the entire networking stack. This
> is overkill, but it works correctly.
>
Indeed. This is exactly what I did when I ported the BSD 4.3 stack to
Helios. A global mutex was claimed around every system call and
released and reclaimed in each [t]sleep(). Interrupts were delivered
by a thread that also locked the mutex. splx() and friends were just
empty macros. There was also some jiggery pokery with swapping the
u. area and dealing with longjumps out of the protocol stack, but it
was all very simple and the BSD code was not changed at all.
Looking at the sources now, I see that none of this has changed, so it
does not look like it was ever a major performance problem.
--
Nick Garnett
Cygnus Solutions, a Red Hat Company
Cambridge, UK