Subversion Repositories HelenOS

Rev

Rev 1787 | Rev 2001 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1787 Rev 1854
Line 31... Line 31...
31
 * @{
31
 * @{
32
 */
32
 */
33
/** @file
33
/** @file
34
 */
34
 */
35
 
35
 
36
#ifndef __FRAME_H__
36
#ifndef KERN_FRAME_H_
37
#define __FRAME_H__
37
#define KERN_FRAME_H_
38
 
38
 
39
#include <arch/types.h>
39
#include <arch/types.h>
40
#include <typedefs.h>
40
#include <typedefs.h>
41
#include <adt/list.h>
41
#include <adt/list.h>
42
#include <synch/spinlock.h>
42
#include <synch/spinlock.h>
Line 59... Line 59...
59
 
59
 
60
#define FRAME_KA        0x1 /* skip frames conflicting with user address space */
60
#define FRAME_KA        0x1 /* skip frames conflicting with user address space */
61
#define FRAME_ATOMIC            0x2 /* do not panic and do not sleep on failure */
61
#define FRAME_ATOMIC            0x2 /* do not panic and do not sleep on failure */
62
#define FRAME_NO_RECLAIM        0x4     /* do not start reclaiming when no free memory */
62
#define FRAME_NO_RECLAIM        0x4     /* do not start reclaiming when no free memory */
63
 
63
 
64
#define FRAME_OK        0   /* frame_alloc return status */
-
 
65
#define FRAME_NO_MEMORY     1   /* frame_alloc return status */
-
 
66
#define FRAME_ERROR     2   /* frame_alloc return status */
-
 
67
 
-
 
68
static inline uintptr_t PFN2ADDR(pfn_t frame)
64
static inline uintptr_t PFN2ADDR(pfn_t frame)
69
{
65
{
70
    return (uintptr_t)(frame << FRAME_WIDTH);
66
    return (uintptr_t)(frame << FRAME_WIDTH);
71
}
67
}
72
 
68
 
Line 111... Line 107...
111
 
107
 
112
#endif
108
#endif
113
 
109
 
114
 /** @}
110
/** @}
115
 */
111
 */
116
 
-