Changeset eb3d379 in mainline for generic/src/mm/frame.c


Ignore:
Timestamp:
2006-06-04T15:58:01Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8adafa0
Parents:
7669bcf
Message:

Slightly remodelled ipc hangups to facilitate correct cleanup.
Doc updates for frame allocator.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • generic/src/mm/frame.c

    r7669bcf reb3d379  
    135135 * Insert-sort zone into zones list
    136136 *
     137 * @param newzone New zone to be inserted into zone list
    137138 * @return zone number on success, -1 on error
    138139 */
     
    173174 * Try to find a zone where can we find the frame
    174175 *
    175  * @param hint Start searching in zone 'hint'
    176  * @param lock Lock zone if true
     176 * @param frame Frame number contained in zone
     177 * @param pzone If not null, it is used as zone hint. Zone index
     178 *              is filled into the variable on success.
     179 * @return Pointer to LOCKED zone containing frame
    177180 *
    178181 * Assume interrupts disable
     
    221224 * Assume interrupts are disabled!!
    222225 *
     226 * @param order Size (2^order) of free space we are trying to find
    223227 * @param pzone Pointer to preferred zone or NULL, on return contains zone number
    224228 */
     
    469473 *
    470474 * Assume zone is locked
     475 *
     476 * @param zone Pointer to zone from which the frame is to be freed
     477 * @param frame_idx Frame index relative to zone
    471478 */
    472479static void zone_frame_free(zone_t *zone, index_t frame_idx)
     
    519526 *
    520527 * Assume z1 & z2 are locked
     528 *
     529 * @param z Target zone structure pointer
     530 * @param z1 Zone to merge
     531 * @param z2 Zone to merge
    521532 */
    522533
     
    628639 *
    629640 * The allocated block need 2^order frames of space. Reduce all frames
    630  * in block to order 0 and free the unneded frames. This means, that
    631  * when freeing the block, you have to free every frame from block.
     641 * in block to order 0 and free the unneeded frames. This means, that
     642 * when freeing the previously allocated block starting with frame_idx,
     643 * you have to free every frame.
    632644 *
    633645 * @param zone
     
    752764 *
    753765 * @param start Physical address of the first frame within the zone.
    754  * @param size Size of the zone. Must be a multiple of FRAME_SIZE.
    755  * @param conffram Address of configuration frame
     766 * @param count Count of frames in zone
     767 * @param z Address of configuration information of zone
    756768 * @param flags Zone flags.
    757769 *
     
    794806}
    795807
    796 /** Compute configuration data size for zone */
     808/** Compute configuration data size for zone
     809 *
     810 * @param count Size of zone in frames
     811 * @return Size of zone configuration info (in bytes)
     812 */
    797813__address zone_conf_size(count_t count)
    798814{
     
    807823/** Create and add zone to system
    808824 *
    809  * @param confframe Where configuration frame is supposed to be.
    810  *                  Always check, that we will not disturb the kernel and possibly init.
     825 * @param start First frame number (absolute)
     826 * @param count Size of zone in frames
     827 * @param confframe Where configuration frames are supposed to be.
     828 *                  Automatically checks, that we will not disturb the
     829 *                  kernel and possibly init.
    811830 *                  If confframe is given _outside_ this zone, it is expected,
    812831 *                  that the area is already marked BUSY and big enough
    813  *                  to contain zone_conf_size() amount of data
     832 *                  to contain zone_conf_size() amount of data.
     833 *                  If the confframe is inside the area, the zone free frame
     834 *                  information is modified not to include it.
    814835 *
    815836 * @return Zone number or -1 on error
Note: See TracChangeset for help on using the changeset viewer.