Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.misc > #8183
| From | Jerry Peters <jerry@example.invalid> |
|---|---|
| Newsgroups | comp.os.linux.misc |
| Subject | Re: An interrupt handler can call function sprintf()? |
| Date | 2013-05-19 20:58 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <knbee5$a4f$1@dont-email.me> (permalink) |
| References | <6c25f801-621d-4484-a3b2-f5cc4491a4a6@googlegroups.com> <knbd90$qbd$1@dont-email.me> |
Jerry Peters <jerry@example.invalid> wrote: > fl <rxjwg98@gmail.com> wrote: >> Hi, >> >> I remember it said that C lib function printf() cannot be called in a device driver in Linux. Today I come across the following code snippet. I wonder that sprintf function can be called in the interrupt function? >> > It can't, because it writes to a file, stdout. Sprintf "writes" to an > existing string so there's no i/o. Sprintf is just a convenient way to > construct a fancy formatted string. > > There is another function, kprintf, which can be used similiarly to > printf, but it wrties to a kernel buffer. Oops, meant printk, not kprintf. Jerry
Back to comp.os.linux.misc | Previous | Next — Previous in thread | Find similar | Unroll thread
An interrupt handler can call function sprintf()? fl <rxjwg98@gmail.com> - 2013-05-19 10:11 -0700
Re: An interrupt handler can call function sprintf()? Jerry Peters <jerry@example.invalid> - 2013-05-19 20:38 +0000
Re: An interrupt handler can call function sprintf()? Jerry Peters <jerry@example.invalid> - 2013-05-19 20:58 +0000
csiph-web