Question: Edit the incomplete C source code to create a linked list to store the birthday information of 5 random students. For each person, the birthday

Edit the incomplete C source code to create a linked list to store the birthday information of 5 random students. For each person, the birthday information should include month, day, year, and name. When the module is loaded, traverse through the linked list and output its content to the kernel log buffer. In addition, write code to identify the oldest student and remove that student from the list. After removing the oldest student, output the updated linked list content to the kernel log buffer. In the module exit point, delete the elements from the updated linked list and return the free memory back to the kernel. Make sure to output a message to the kernel log buffer every time an element is deleted.

The Psuedo code:

#include #include #include #include

struct birthday { };

/** * The following defines and initializes a list_head object named birthday_list */ static LIST_HEAD(birthday_list);

int simple_init(void) {

printk(KERN_INFO "Loading Module ");

return 0; }

void simple_exit(void) { printk(KERN_INFO "Removing Module ");

}

module_init( simple_init ); module_exit( simple_exit );

MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("Kernel Data Structures"); MODULE_AUTHOR("SGG");

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!