/*
* =====================================================================================
*
* Filename: resource.c
*
* Description:
*
* Version: 1.0
* Created: 09/13/2011 10:25:23 AM
* Revision: none
* Compiler: gcc
*
* Author: YOUR NAME (),
* Company:
*
* =====================================================================================
*/
#include <stdio.h>
typedef unsigned long resource_size_t;
struct resource {
resource_size_t start;
resource_size_t end;
const char *name;
unsigned long flags;
struct resource *parent, *sibling, *child;
};
struct resource root;
struct resource res[10];
void init()
{
int i;
root.start = 0;
root.end = 1000;
res[0].start = 10;
res[0].end = 50;
res[1].start = 90;
res[1].end = 150;
res[2].start = 210;
res[2].end = 250;
res[3].start = 310;
res[3].end = 450;
/*link it*/
root.child = &res[0];
for(i = 0; i< 3; i+
* =====================================================================================
*
* Filename: resource.c
*
* Description:
*
* Version: 1.0
* Created: 09/13/2011 10:25:23 AM
* Revision: none
* Compiler: gcc
*
* Author: YOUR NAME (),
* Company:
*
* =====================================================================================
*/
#include <stdio.h>
typedef unsigned long resource_size_t;
struct resource {
resource_size_t start;
resource_size_t end;
const char *name;
unsigned long flags;
struct resource *parent, *sibling, *child;
};
struct resource root;
struct resource res[10];
void init()
{
int i;
root.start = 0;
root.end = 1000;
res[0].start = 10;
res[0].end = 50;
res[1].start = 90;
res[1].end = 150;
res[2].start = 210;
res[2].end = 250;
res[3].start = 310;
res[3].end = 450;
/*link it*/
root.child = &res[0];
for(i = 0; i< 3; i+