Changeset e456008 in mainline


Ignore:
Timestamp:
2005-09-20T21:54:13Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
fcacfb7
Parents:
c0a91d1
Message:

Add zone pointer to frame_t.
This will be essential for fast frame_free().

Rename frame_zone_t to zone_t.

Declare frame and zone functions to be implemented.

Location:
include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • include/mm/frame.h

    rc0a91d1 re456008  
    3838#define FRAME_PANIC     2       /* panic on failure */
    3939
    40 struct frame_zone {
    41         link_t fz_link;         /**< link to previous and next frame_zone */
     40struct zone {
     41        link_t link;            /**< link to previous and next zone */
    4242
    4343        spinlock_t lock;        /**< this lock protects everything below */
     
    5252
    5353struct frame {
     54        zone_t *zone;           /**< host zone */
    5455        count_t refcount;       /**< when > 0, the frame is in busy list, otherwise the frame is in free list */
    5556        link_t link;            /**< link either to frame_zone free or busy list */
    5657};
    5758
    58 extern spinlock_t frame_zone_head_lock;         /**< this lock protects frame_zone_head list */
    59 extern link_t frame_zone_head;                  /**< list of all frame_zone's in the system */
     59extern spinlock_t zone_head_lock;       /**< this lock protects zone_head list */
     60extern link_t zone_head;                /**< list of all zones in the system */
    6061
    6162extern count_t frames;
     
    7778extern void frame_region_not_free(__address start, __address stop);
    7879
    79 extern frame_zone_t *frame_zone_create();
     80/*
     81 * TODO: Implement the following functions.
     82 */
     83
     84extern void zone_init(void);
     85extern zone_t *zone_create(__address start, size_t size, int flags);
     86extern void zone_attach(zone_t *zone);
     87 
     88/*
     89extern frame_t *frame_alloc(int flags);
     90extern void frame_free(frame_t *frame);
     91*/
     92extern void frame_initialize(frame_t *frame);
     93extern __address frame_get_address(frame_t *frame);
     94extern frame_t *frame_reference(frame_t *frame);
     95extern void frame_release(frame_t *frame);
     96
    8097#endif
  • include/typedefs.h

    rc0a91d1 re456008  
    6464typedef struct chunk chunk_t;
    6565
    66 typedef struct frame_zone frame_zone_t;
     66typedef struct zone zone_t;
    6767typedef struct frame frame_t;
    6868
Note: See TracChangeset for help on using the changeset viewer.