Subversion Repositories HelenOS

Rev

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

Rev 3129 Rev 3149
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 1628... Line 1625...
1628
                return 1;
1625
                return 1;
1629
            }
1626
            }
1630
        }
1627
        }
1631
    }
1628
    }
1632
 
1629
 
1633
    panic("Inconsistency detected while adding %d pages of used space at "
1630
    panic("Inconsistency detected while adding %" PRIc " pages of used space at "
1634
        "%p.\n", count, page);
1631
        "%p.\n", count, page);
1635
}
1632
}
1636
 
1633
 
1637
/** Mark portion of address space area as unused.
1634
/** Mark portion of address space area as unused.
1638
 *
1635
 *
Line 1807... Line 1804...
1807
            return 0;
1804
            return 0;
1808
        }
1805
        }
1809
    }
1806
    }
1810
 
1807
 
1811
error:
1808
error:
1812
    panic("Inconsistency detected while removing %d pages of used space "
1809
    panic("Inconsistency detected while removing %" PRIc " pages of used space "
1813
        "from %p.\n", count, page);
1810
        "from %p.\n", count, page);
1814
}
1811
}
1815
 
1812
 
1816
/** Remove reference to address space area share info.
1813
/** Remove reference to address space area share info.
1817
 *
1814
 *
Line 1906... Line 1903...
1906
        unsigned int i;
1903
        unsigned int i;
1907
        for (i = 0; i < node->keys; i++) {
1904
        for (i = 0; i < node->keys; i++) {
1908
            as_area_t *area = node->value[i];
1905
            as_area_t *area = node->value[i];
1909
       
1906
       
1910
            mutex_lock(&area->lock);
1907
            mutex_lock(&area->lock);
1911
            printf("as_area: %p, base=%p, pages=%d (%p - %p)\n",
1908
            printf("as_area: %p, base=%p, pages=%" PRIc " (%p - %p)\n",
1912
                area, area->base, area->pages, area->base,
1909
                area, area->base, area->pages, area->base,
1913
                area->base + area->pages*PAGE_SIZE);
1910
                area->base + FRAMES2SIZE(area->pages));
1914
            mutex_unlock(&area->lock);
1911
            mutex_unlock(&area->lock);
1915
        }
1912
        }
1916
    }
1913
    }
1917
   
1914
   
1918
    mutex_unlock(&as->lock);
1915
    mutex_unlock(&as->lock);