The question I found it from the text as following:
You are required to design, implement and test a function, sort_list(.), which will sort such a list according to the priority value computed by whatever function is passed as its second argument. The first argument is to be a pointer to the head of the list. Since the OS will have other structures with pointers to IORB's, the list must be sorted in place.
typedef struct iorb {
short base_pri;
struct iorb *link;
char filler[110];
} IORB;
void sort_list(IORB **list,int(*newpr)(short));
int newp(short base)
{
return base;
}
question
1) provide the coding for inserting a value
2) insert into a list
Thanks,
Frank



LinkBack URL
About LinkBacks


