Re: printf & writing to disk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ran,

> How should printf and write to disk should be handled in rt application ?
> 
> 1. printf - can it be used in rt application ? how ?
> 
> 2. writing to file in disk - should it be done in separate thread with
> lower priority ? or doesn't it make any difference in which thread ?

For both questions you postpone execution of your thread by waiting for the IO to complete. So it will interrupt your RT scheduling. 

The way we deal with it is the same as in cyclictest, and what you already hint on: use lock-free data-structures (e.g. ringbuffers) and a lower priority thread to do the IO.

vsprintf *should* work though. So you could produce the output you desire, but just don’t write it in the RT context.

Cheers,

Diez��.n��������+%������w��{.n�����{�����ǫ���ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f




[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux