Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Paul Rubin Newsgroups: comp.arch.embedded Subject: Re: Delayed "printf" Date: Mon, 24 Apr 2017 19:53:03 -0700 Organization: A noiseless patient Spider Lines: 7 Message-ID: <87a875nqpc.fsf@nightsong.com> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="c5117d3acda5babf921cd2f7c18d36c7"; logging-data="25256"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/tmRC3Zmp7ddhwPKUYXL8P" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:4pauLdicdvMBRLPlNPFpw8RwWO4= sha1:wCfJNB9xcJrkk+IAJzFzbyhLKDY= Xref: csiph.com comp.arch.embedded:26410 Tim Wescott writes: > Just how dumb is it to have "printf" queue up the format string AND the > parameters into a buffer, to be printed out in some low-priority task? It's fine, just be sure that if there are pointer parameters (like for %s in the format string) that the objects they point to survive long enough for the logging task to print them.