This is the mail archive of the
ecos-discuss@sourceware.cygnus.com
mailing list for the eCos project.
Re: Two TCP/IP stack issues...
- To: gthomas at redhat dot com
- Subject: Re: [ECOS] Two TCP/IP stack issues...
- From: Ian Lance Taylor <ian at zembu dot com>
- Date: 11 Apr 2000 23:37:03 -0700
- CC: grante at visi dot com, ecos-discuss at sourceware dot cygnus dot com
- References: <XFMail.000411151056.gthomas@redhat.com>
Date: Tue, 11 Apr 2000 15:10:56 -0600 (MDT)
From: Gary Thomas <gthomas@redhat.com>
As I'm sure you can see, this TCP/IP stack was imported, as directly as
possible, from the current OpenBSD sources. It was felt that this approach
would lead to a workable system in the least amount of time. Also, by
using an established Open Source code base, we would gain the experience
of that code base. A concious effort was made to minimize any changes
to the original sources so that improvements in the OpenBSD world could
be easily tracked and merged back into the eCos version.
However, as can be seen by these problems, there are problems and
concerns when using legacy code. Some things that "just worked" because
of certain assumptions in one code base will not work in another. The
problem you have uncovered, while it did not show up in our testing,
is one such problem. In traditional BSD systems, the kernel was not
truly pre-emptable, i.e. control over a CPU could not be lost while
executing in the kernel unless that particular kernel "thread" blocked.
In a truly pre-emptable system like eCos, this assumption is not valid
and problems like what you have encountered can occur.
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.
Ian