How to understand statements on FIFO j->pin in bch_journal_next

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

 



Hi,

Sorry to trouble you.

I noticed some statements in the function:
---------------------------------------------------------
void bch_journal_next(struct journal *j)
{
    atomic_t p = { 1 };
    ...
    BUG_ON(!fifo_push(&j->pin, p));
    atomic_set(&fifo_back(&j->pin), 1);

    ...

fifo_push would add atomic_t {1} to the back of the FIFO, while next
atomic_set would set the back element of FIFO to 1, which is atomic_t {1}.

I wonder why there is additional atomic_set statement ?

------------------
Regards,
shenghuiÿôèº{.nÇ+?·?®?­?+%?Ëÿ±éݶ¥?wÿº{.nÇ+?·¥?{±ý·rÿ?{ayºÊ?Ú?ë,j­¢f£¢·h??ï?êÿ?êçz_è®(­é???Ý¢j"?ú¶m§ÿÿ¾«þG«?éÿ¢¸??¨è­Ú&£ø§~?á




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux ARM Kernel]     [Linux Filesystem Development]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux