Changeset acda8f0 in mainline


Ignore:
Timestamp:
2010-04-26T19:41:27Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
aeb6f25
Parents:
556f9892
Message:

Proper way of testing the mutex_trylock() return value.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/sysinfo/stats.c

    r556f9892 racda8f0  
    169169         */
    170170
    171         if (!mutex_trylock(&as->lock))
     171        if (SYNCH_FAILED(mutex_trylock(&as->lock)))
    172172                return result * PAGE_SIZE;
    173173       
     
    183183                        as_area_t *area = node->value[i];
    184184                       
    185                         if (!mutex_trylock(&area->lock))
     185                        if (SYNCH_FAILED(mutex_trylock(&area->lock)))
    186186                                continue;
    187187                        result += area->pages;
Note: See TracChangeset for help on using the changeset viewer.