Subversion Repositories HelenOS

Rev

Rev 2745 | Rev 3104 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2745 Rev 3057
Line 451... Line 451...
451
                     * address space area.
451
                     * address space area.
452
                     */
452
                     */
453
       
453
       
454
                    cond = false;   /* we are almost done */
454
                    cond = false;   /* we are almost done */
455
                    i = (start_free - b) >> PAGE_WIDTH;
455
                    i = (start_free - b) >> PAGE_WIDTH;
456
                    if (!used_space_remove(area, start_free,
456
                    if (!used_space_remove(area, start_free, c - i))
457
                        c - i))
-
 
458
                        panic("Could not remove used "
457
                        panic("Could not remove used space.\n");
459
                            "space.\n");
-
 
460
                } else {
458
                } else {
461
                    /*
459
                    /*
462
                     * The interval of used space can be
460
                     * The interval of used space can be
463
                     * completely removed.
461
                     * completely removed.
464
                     */
462
                     */
465
                    if (!used_space_remove(area, b, c))
463
                    if (!used_space_remove(area, b, c))
466
                        panic("Could not remove used "
464
                        panic("Could not remove used space.\n");
467
                            "space.\n");
-
 
468
                }
465
                }
469
           
466
           
470
                for (; i < c; i++) {
467
                for (; i < c; i++) {
471
                    pte_t *pte;
468
                    pte_t *pte;
472
           
469
           
Line 1526... Line 1523...
1526
                return 1;
1523
                return 1;
1527
            }
1524
            }
1528
        }
1525
        }
1529
    }
1526
    }
1530
 
1527
 
1531
    panic("Inconsistency detected while adding %d pages of used space at "
1528
    panic("Inconsistency detected while adding %" PRIc " pages of used space at "
1532
        "%p.\n", count, page);
1529
        "%p.\n", count, page);
1533
}
1530
}
1534
 
1531
 
1535
/** Mark portion of address space area as unused.
1532
/** Mark portion of address space area as unused.
1536
 *
1533
 *
Line 1705... Line 1702...
1705
            return 0;
1702
            return 0;
1706
        }
1703
        }
1707
    }
1704
    }
1708
 
1705
 
1709
error:
1706
error:
1710
    panic("Inconsistency detected while removing %d pages of used space "
1707
    panic("Inconsistency detected while removing %" PRIc " pages of used space "
1711
        "from %p.\n", count, page);
1708
        "from %p.\n", count, page);
1712
}
1709
}
1713
 
1710
 
1714
/** Remove reference to address space area share info.
1711
/** Remove reference to address space area share info.
1715
 *
1712
 *
Line 1798... Line 1795...
1798
        unsigned int i;
1795
        unsigned int i;
1799
        for (i = 0; i < node->keys; i++) {
1796
        for (i = 0; i < node->keys; i++) {
1800
            as_area_t *area = node->value[i];
1797
            as_area_t *area = node->value[i];
1801
       
1798
       
1802
            mutex_lock(&area->lock);
1799
            mutex_lock(&area->lock);
1803
            printf("as_area: %p, base=%p, pages=%d (%p - %p)\n",
1800
            printf("as_area: %p, base=%p, pages=%" PRIc " (%p - %p)\n",
1804
                area, area->base, area->pages, area->base,
1801
                area, area->base, area->pages, area->base,
1805
                area->base + area->pages*PAGE_SIZE);
1802
                area->base + FRAMES2SIZE(area->pages));
1806
            mutex_unlock(&area->lock);
1803
            mutex_unlock(&area->lock);
1807
        }
1804
        }
1808
    }
1805
    }
1809
   
1806
   
1810
    mutex_unlock(&as->lock);
1807
    mutex_unlock(&as->lock);