From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30879 invoked by alias); 10 May 2007 16:02:05 -0000 Received: (qmail 30865 invoked by uid 22791); 10 May 2007 16:02:03 -0000 X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 10 May 2007 16:01:58 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1HmB4w-000139-R5 for ecos-discuss@sources.redhat.com; Thu, 10 May 2007 18:01:19 +0200 Received: from c-76-17-159-202.hsd1.mn.comcast.net ([76.17.159.202]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 10 May 2007 18:01:18 +0200 Received: from grante by c-76-17-159-202.hsd1.mn.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 10 May 2007 18:01:18 +0200 To: ecos-discuss@sources.redhat.com From: Grant Edwards Date: Thu, 10 May 2007 21:40:00 -0000 Message-ID: References: <4DD3AF7ECBBC43409BA36508938D0185123B75@CVAEX1.VERTICAL.COM> <464331E6.9070800@mlbassoc.com> User-Agent: slrn/0.9.8.1 (Linux) X-IsSubscribed: yes 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: [ECOS] Re: remote syslog support in Redboot? X-SW-Source: 2007-05/txt/msg00059.txt.bz2 On 2007-05-10, Gary Thomas wrote: >>>> Has anyone implemented the ability to have diag_printf() >>>> messages be sent to a remote syslog server in Redboot/ecos? >>> >>> You will have to be careful when doing this. diag_printf() >>> uses a very simple polled IO, blocking serial device driver. >>> The idea is that it should always work, in any context. So you >>> can do a diag_printf() in an ISR or a DSR, not just a thread. >>> It is also guaranteed the output will be out the serial port >>> before diag_printf() returns. >> >> How is this guaranteed if I connect to Redboot on tcp port >> 9000? > > RedBoot uses a polled TCP connection, thus when you make a > call to diag_printf() that channels through RedBoot, it _will_ > complete at the receiver before continuing. I've wondered about that. The comment for __tcp_write_block() says that it blocks until sent. What it appears to do by calling __tcp_drain() (and what is implied by your statement above) is that it blocks until the data is _ACKed_ not until the data is _sent_. -- Grant Edwards grante Yow! My BIOLOGICAL ALARM at CLOCK just went off ... It visi.com has noiseless DOZE FUNCTION and full kitchen!! -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss