コード例 #1
0
ファイル: paging.c プロジェクト: CodeGrimoire/BaMFos
static uint32_t test_frame(uintptr_t addr)
{
	uintptr_t frame = addr/0x1000;
	uint32_t idx = INDEX_FROM_BIT(frame);
	uint32_t off = OFFSET_FROM_BIT(frame);
	return (frames[idx] & (0x1 << off));	
}
コード例 #2
0
ファイル: pmm.c プロジェクト: Nov11/jamesos
void clear_frame(u32int frame_addr)
{
	u32int frame = frame_addr / 0x1000;
	u32int idx = INDEX_FROM_BIT(frame);
	u32int off = OFFSET_FROM_BIT(frame);
	frames[idx] &= ~(0x1 << off);
}
コード例 #3
0
ファイル: paging.c プロジェクト: CodeGrimoire/BaMFos
static void clear_frame(uintptr_t addr)
{
	uintptr_t frame = addr/0x1000;
	uint32_t idx = INDEX_FROM_BIT(frame);
	uint32_t off = OFFSET_FROM_BIT(frame);
	frames[idx] &= ~(0x1 << off);
}
コード例 #4
0
ファイル: pmm.c プロジェクト: Nov11/jamesos
u32int test_frame(u32int frame_addr)
{
	u32int frame = frame_addr / 0x1000;
	u32int idx = INDEX_FROM_BIT(frame);
	u32int off = OFFSET_FROM_BIT(frame);
	return frames[idx] & (0x1 << off);
}
コード例 #5
0
ファイル: frame.c プロジェクト: hach-que/Kernel
/* Static function to test if a bit is set */
static unsigned int test_frame(addr frame_addr)
{
    addr frame = frame_addr/0x1000;
    addr idx = INDEX_FROM_BIT(frame);
    addr off = OFFSET_FROM_BIT(frame);
    return (frames[idx] & (0x1 << off));
}
コード例 #6
0
ファイル: page.c プロジェクト: salma-rodriguez/toyOS
static void clear_frame(uint32_t frame_addr)
{
	uint32_t frame = frame_addr/PAGE_SIZ;
	uint32_t idx = INDEX_FROM_BIT(frame);
	uint32_t off = OFFSET_FROM_BIT(frame);
	frames[idx] &= ~(0x1 << off);
}
コード例 #7
0
ファイル: frame.c プロジェクト: hach-que/Kernel
/* Static function to set a bit in the frames bitset */
static void set_frame(addr frame_addr)
{
    addr frame = frame_addr/0x1000;
    addr idx = INDEX_FROM_BIT(frame);
    addr off = OFFSET_FROM_BIT(frame);
    frames[idx] |= (0x1 << off);
}
コード例 #8
0
ファイル: frame.c プロジェクト: theunamedguy/gamma
static void clear_frame(uint32_t frame_addr)
{
  uint32_t frame=frame_addr/0x1000;
  uint32_t idx=INDEX_FROM_BIT(frame);
  uint32_t offset=OFFSET_FROM_BIT(frame);
  frames[idx] &= ( ~(1<<offset) );
}
コード例 #9
0
ファイル: frame.c プロジェクト: theunamedguy/gamma
static uint32_t test_frame(uint32_t frame_addr)
{
  uint32_t frame=frame_addr/0x1000;
  uint32_t idx=INDEX_FROM_BIT(frame);
  uint32_t offset=OFFSET_FROM_BIT(frame);
  return frames[idx] & (1<<offset);
}
コード例 #10
0
ファイル: page.c プロジェクト: Ted-Chang/matrix
static void set_frame(uint32_t frame_addr)
{
	uint32_t frame = frame_addr / 0x1000;
	uint32_t idx = INDEX_FROM_BIT(frame);
	uint32_t off = OFFSET_FROM_BIT(frame);

	_pages[idx] |= (0x1 << off);
}
コード例 #11
0
ファイル: page.c プロジェクト: salma-rodriguez/toyOS
static void set_frame(uint32_t frame_addr)
{
	off_t off;
	uint32_t idx, frame;
	frame = frame_addr/PAGE_SIZ;
	idx = INDEX_FROM_BIT(frame);
	off = OFFSET_FROM_BIT(frame);
	frames[idx] |= (0x1 << off);
}
コード例 #12
0
ファイル: bitset.hpp プロジェクト: Heitorh3/miniOS
		// Static function to test if a bit is set.
		inline bool operator[]( const size_t &pos ) const {
			//static u32int test_frame(u32int frame_addr)
			//{
//			uint32_t frame = frame_addr/0x1000;
			const uint32_t idx = INDEX_FROM_BIT(pos);
			const uint32_t off = OFFSET_FROM_BIT(pos);
			return (base[idx] & (0x1 << off));
			//}
		}
コード例 #13
0
ファイル: paging.c プロジェクト: CodeGrimoire/BaMFos
static void set_frame(uintptr_t addr)
{
	if(addr < nframes * 0x1000)
	{
		uint32_t frame = addr/0x1000;
		uint32_t idx = INDEX_FROM_BIT(frame);
		uint32_t off = OFFSET_FROM_BIT(frame);
		frames[idx] |= (0x1 << off);
	}
}
コード例 #14
0
ファイル: bitset.hpp プロジェクト: Heitorh3/miniOS
		inline void clear( const size_t &pos ){
//			uint32_t frame = frame_addr/0x1000;
			const uint32_t idx = INDEX_FROM_BIT(pos);
			const uint32_t off = OFFSET_FROM_BIT(pos);
			base[idx] &= ~(0x1 << off);
		}
コード例 #15
0
ファイル: bitset.hpp プロジェクト: Heitorh3/miniOS
		inline void set( const size_t &pos ){
//			u32int frame = frame_addr/0x1000;
			const uint32_t idx = INDEX_FROM_BIT(pos);
			const uint32_t off = OFFSET_FROM_BIT(pos);
			base[idx] |= (0x1 << off);
		}
コード例 #16
0
ファイル: scheduler.c プロジェクト: UIKit0/pmk
/**
 * Set a bit in the frames bitset as used.
 *
 * @param frame Offset into the array
 */
static inline void set_frame(unsigned int frame) {
	unsigned int idx = INDEX_FROM_BIT(frame);
	unsigned int off = OFFSET_FROM_BIT(frame);
	frames[idx] |= (0x1 << off);
}