netdemo echoServer issue [was: Re: listen/select and then accept pattern not working?]

Karel Gardas kgardas at objectsecurity.com
Tue Jan 18 07:52:55 UTC 2005


On Tue, 18 Jan 2005, Ian Caddy wrote:

> Karel Gardas wrote:
> > On Tue, 18 Jan 2005, Chris Johns wrote:
> >
> >
> >>Karel Gardas wrote:
> >>
> >>>On Mon, 17 Jan 2005, Karel Gardas wrote:
> >>>
> >>>       ++sc->stats.rx_acks;
> >>>       rtems_event_send (sc->rx_daemon_tid, INTERRUPT_EVENT);
> >>>+      printf("\nNE: receive packet\n");
> >>
> >>Should this be printk rather than printf ?
> >
> >
> > Good note, but does it change anything? i.e. is printf sometimes disabled,
> > sometimes enabled in kernel? I've thought when it prints something, it
> > definitelly works.
> >
>
> I think what Chris was trying to say was it looks like that code is
> contained in the ISR.  printf is not safe to call from an ISR and
> anything could happen.  That is the reason for the printk function which
> is safe to call from an ISR.

Aha! I'm starting to understand. Thanks for explanation,

Karel
--
Karel Gardas                  kgardas at objectsecurity.com
ObjectSecurity Ltd.           http://www.objectsecurity.com




More information about the users mailing list