Changeset 2a2fbc8 in mainline for kernel/generic/src/synch/futex.c


Ignore:
Timestamp:
2016-09-01T17:05:13Z (8 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
42d08592
Parents:
f126c87 (diff), fb63c06 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge from lp:~jakub/helenos/pt

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/synch/futex.c

    rf126c87 r2a2fbc8  
    291291        spinlock_lock(&futex_ht_lock);
    292292
    293         bool found = false;
    294         pte_t *t = page_mapping_find(AS, ALIGN_DOWN(uaddr, PAGE_SIZE), true);
    295        
    296         if (t && PTE_VALID(t) && PTE_PRESENT(t)) {
    297                 found = true;
    298                 *paddr = PTE_GET_FRAME(t) + (uaddr - ALIGN_DOWN(uaddr, PAGE_SIZE));
     293        bool success = false;
     294
     295        pte_t t;
     296        bool found;
     297
     298        found = page_mapping_find(AS, ALIGN_DOWN(uaddr, PAGE_SIZE), true, &t);
     299        if (found && PTE_VALID(&t) && PTE_PRESENT(&t)) {
     300                success = true;
     301                *paddr = PTE_GET_FRAME(&t) +
     302                    (uaddr - ALIGN_DOWN(uaddr, PAGE_SIZE));
    299303        }
    300304       
     
    302306        page_table_unlock(AS, false);
    303307       
    304         return found;
     308        return success;
    305309}
    306310
Note: See TracChangeset for help on using the changeset viewer.