[pso] [tema 2 ] linux - deadlock ciudat

octavian ganea oooctavian at gmail.com
Wed Apr 21 23:32:00 EEST 2010


Am declarat variabila volatile si face la fel. Iar codul :
    x= data->size_read;
    printk(LOG_LEVEL "5 :am intrat in READ; size_read=%d\n",
data->size_read );

    spin_lock_irqsave(&data->lock_read, flags);
    data->size_read = x;
    printk(LOG_LEVEL "6 !!!!!!!!!com %d :am intrat in READ; size =%d; unde
offset=%d, size_read=%d; x=%d\n", com, size, *offset, data->size_read, x );

se comporta si mai ciudat : in msjul 6 - x are valoarea ok de la inceput,
dar data->size_read este tot 0 desi tocmai ce ii facusem atribuirea . Any
ideas?

Multumesc

În data de 21 aprilie 2010, 23:25, octavian ganea <oooctavian at gmail.com> a
scris:

> Am si eu o problema ciudata:
>
> In functia read am urmatoarele linii:
>
> printk(LOG_LEVEL "5 :am intrat in READ; size_read=%d\n",  data->size_read
> );
>
>     spin_lock_irqsave(&data->lock_read, flags);
>
>     printk(LOG_LEVEL "6 !!!!!!!!!com %d :am intrat in READ; size =%d; unde
> offset=%d, size_read=%d; x=%d\n", com, size, *offset, data->size_read, x );
>
> De fiecare data cand rulez, pe la primele teste se blocheaza (inclusiv
> masina virtuala) pentru ca : msjul 5 afiseaza un data->size_read (dim
> bufferului de read) corect , dar msjul 6 afiseaza data->size_read= 0 ; intre
> aceste doua printk-uri nu imi intra in intrerupere . Ce poate sa il
> determine sa reseteze size_read ?
>
> Multumesc
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cursuri.cs.pub.ro/lurker/list/pso.html/attachments/20100421/7c37de2d/attachment.htm>


More information about the pso mailing list