contributed by < bakudr18>
作業要求
queue.c 實作
q_new 及 q_free
q_new 在 list head 配置一個 struct list_head 即可,而 q_free 需要走訪整個 list 來 delete node ,因為走訪過程會 remove node ,因此需要用 list_for_each_entry_safe 保留一個 tmp node 來避免迭代過程錯誤 ,刪除完所有 node 後最後再釋放 list head 。
struct list_head *q_new()
{