public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Grant Edwards <grante@visi.com>
To: "Trenton D. Adams" <tadams@theone.dnsalias.com>
Cc: 'Andrew Lunn' <andrew.lunn@ascom.ch>,
	'eCos Discussion' <ecos-discuss@sourceware.cygnus.com>
Subject: Re: [ECOS] Network programming for eCos under linux
Date: Wed, 08 Aug 2001 08:09:00 -0000	[thread overview]
Message-ID: <20010808101113.A13989@visi.com> (raw)
In-Reply-To: <000901c1201a$5c7e1590$090110ac@TRENT>

On Wed, Aug 08, 2001 at 08:56:52AM -0600, Trenton D. Adams wrote:


>   > Watch out for endianness issues. i386 linux is little endian.
>   > Whats the endianness of your target? Things like this affects
>   > network code.
> 
> This shouldn't pose a problem since I've configured my ARM as
> little-endian.  However, htons (), htonl (), etc should solve that
> problem anyhow, shouldn't it?  I mean as far networking code goes that
> is.  I would obviously have to be careful about data types between the
> two if they were different.  It's nice to have the ARM with 32-bit
> little-endian!  Makes my life a lot easier since I'm sending data to a
> PC.

You're headed for trouble.  I work on software where the author
"knew" data was being sent from one little endian machine to
another over the network.  Unfortunately one of the ends is now
big-endian, and it's now a royal PITA to maintain this stuff.
Unfortunalyte there aren't standard host-to-little-endian and
little-endian-to-host macros.

> What about threads?  How do those work under Linux?  Are they similar at
> all?  

The set of mechanisms is similar, but the details are
different. For example, roughly the same set of calls to
synchronize threads exists, but the data types and calling
conventions are different.

If you only use a small set of features, wrapping the Linux
calls to make them look like eCos calls would be a viable
option.  An eCos emulator that runs on top of one of the
popular Unix threading libraries would be an interesting
project.  You couldn't accurately emulate the scheduling
algorithm, but for some applications it could be useful.

-- 
Grant Edwards
grante@visi.com

  reply	other threads:[~2001-08-08  8:09 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-07 15:41 Trenton D. Adams
2001-08-08  0:35 ` Andrew Lunn
2001-08-08  6:27   ` Jonathan Larmour
2001-08-08  6:51     ` Andrew Lunn
2001-08-08  7:13       ` Grant Edwards
2001-08-08  7:52         ` Jonathan Larmour
2001-08-08  8:02           ` Andrew Lunn
2001-08-08  8:06           ` Trenton D. Adams
2001-08-08  8:14             ` Jonathan Larmour
2001-08-08  8:47               ` Trenton D. Adams
2001-08-08  8:58               ` Trenton D. Adams
2001-08-08  9:04                 ` Mark Salter
2001-08-08  9:06                 ` Jonathan Larmour
2001-08-08  9:19                   ` [ECOS] " Grant Edwards
2001-08-08  9:07                 ` Grant Edwards
2001-08-08  8:32             ` [ECOS] " Grant Edwards
2001-08-08  8:43               ` Trenton D. Adams
2001-08-08  8:57                 ` [ECOS] " Grant Edwards
2001-08-08  7:57   ` [ECOS] " Trenton D. Adams
2001-08-08  8:09     ` Grant Edwards [this message]
2001-08-08  8:14       ` Trenton D. Adams
2001-08-08  8:42         ` Grant Edwards
2001-08-08  8:21     ` Andrew Lunn
2001-08-08  8:27       ` Trenton D. Adams
2001-08-08  9:00       ` [ECOS] " Grant Edwards

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=20010808101113.A13989@visi.com \
    --to=grante@visi.com \
    --cc=andrew.lunn@ascom.ch \
    --cc=ecos-discuss@sourceware.cygnus.com \
    --cc=tadams@theone.dnsalias.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).