From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9566 invoked by alias); 30 May 2007 11:59:41 -0000 Received: (qmail 9557 invoked by uid 22791); 30 May 2007 11:59:40 -0000 X-Spam-Check-By: sourceware.org Received: from 204-133-123-27.dia.static.slbbi.com (HELO mail.chez-thomas.org) (204.133.123.27) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 30 May 2007 11:59:38 +0000 Received: by mail.chez-thomas.org (Postfix, from userid 999) id 4AED5195012B; Wed, 30 May 2007 05:59:36 -0600 (MDT) Received: from [192.168.1.101] (hermes_local [192.168.1.101]) by mail.chez-thomas.org (Postfix) with ESMTP id EA26E1950090; Wed, 30 May 2007 05:59:33 -0600 (MDT) Message-ID: <465D6725.9010502@mlbassoc.com> Date: Wed, 30 May 2007 13:07:00 -0000 From: Gary Thomas User-Agent: Thunderbird 1.5.0.10 (X11/20070301) MIME-Version: 1.0 To: Alok Singh CC: ecos-discuss@ecos.sourceware.org References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: Re: [ECOS] Net BSD network stack posix tasks - X-SW-Source: 2007-05/txt/msg00172.txt.bz2 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Alok Singh wrote: > Thanks for all the suggestions. My only issue is, and a simple one, that > if I want to send a packet out of the device in the network thread > context, then I've problems. We have our implementation of message > queues, mutexes, and other stuff that all use POSIX calls. So the code > crashes, since I'm trying to make posix calls (while putting the packet > in the message queue, and using mutexes), in the context of native cyg > thread context. To overcome this problem, I'm queuing the packet coming > out of the network stack, and then another posix thread de-queues the > packet, and sends it out. This is working fine except that performance > is not that good, and some fine tuning is required. In the limited > testing I did while sending the packet out in the context of network > thread, the performance is better, and suits my purpose. Sorry, but this description doesn't make a lot of sense (to me at least). There should be no difference doing network I/O from a POSIX thread and a native eCos thread. Everything should boil down to socket I/O, which is the API exported by the network stacks. Perhaps you can explain in more detail, or provide some code snippets. What do you mean by "send a packet out of the device in the network thread context?" > > There is no issue with BSD stack. It runs perfectly fine. > > regards, > Alok > > -----Original Message----- > From: ecos-discuss-owner@ecos.sourceware.org > [mailto:ecos-discuss-owner@ecos.sourceware.org] On Behalf Of Nick > Garnett > Sent: Tuesday, May 29, 2007 10:56 PM > To: Alok Singh > Cc: ecos-discuss@ecos.sourceware.org > Subject: Re: [ECOS] Net BSD network stack posix tasks - > > "Alok Singh" writes: > >> Hi, >> I don't understand licensing issues much. I've a question. Am I > allowed >> to convert network stack threads to posix threads instead of native > cyg >> threads? I've compatibility issues making ecos network stack work > with >> my application (Posix based.) Though there are ways to overcome this >> issue, but they affect the performance of the system. > > (I'm not sure why this has anything to do with licensing.) > > The network threads are internal to the stack. POSIX threads are for > running application code. The network threads will never run > application code and so don't need to be POSIX threads. The network > threads work perfectly well alongside POSIX applications without > needing to be POSIX threads themselves. > > I don't know what problems you are having, but your suggestion is > almost certainly the wrong solution. It sounds to me like you are > trying to do something that eCos doesn't support. Tell us what the > problem is and maybe someone can offer a better solution. > > - -- - ------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world - ------------------------------------------------------------ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFGXWckmaKbSsQGV8ARAr3GAKCCnOVJk6HLJcYN9wLLJSVzJLAOlgCgqeUN +tgYjbY2PUR/MndJIzNO3GM= =K/bm -----END PGP SIGNATURE----- -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss