This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: remote syslog support in Redboot?


On 2007-05-10, Gary Thomas <gary@mlbassoc.com> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]