張皓鈞

@itsme

Joined on Mar 15, 2019

  • 題目1 考慮以下仿效 Linux 核心 include/linux/list.h 的精簡實作: #include <stddef.h> /** * container_of() - Calculate address of object that contains address ptr * @ptr: pointer to member variable * @type: type of the structure containing ptr * @member: name of the member variable in struct @type
     Like  Bookmark
  • contributed by < hankchang805 > quiz4 題目 測驗 1 考慮到以下 bitcpy 實作,允許開發者對指定的記憶體區域,逐 bit 進行資料複製: #include <stdint.h> #include <stdio.h> #include <string.h>
     Like  Bookmark
  • contributed by < hankchang805 > 開發紀錄 queue.h queue_t 為了讓 q_insert_tail 以及 q_size 可以在 $O(1)$ 的時間複雜度內完成,所以增加 tail (指向 queue 中最後一個元素)以及 size (紀錄目前 queue 有幾個元素) typedef struct { list_ele_t *head; list_ele_t *tail;
     Like  Bookmark
  • # 2019q3(Homework2) Lab0 contributed by <` hankchang805`> #### tags: `sysprog2019` ## 閱讀資料 * [C Programming lab](http://www.cs.cmu.edu/~213/labs/cprogramminglab.pdf) * [F01: lab0](https://hackmd.io/s/BJA8EgFB4) ## 作業要求 * 用 linked-list 來實作 queue * queue 要支援 LIFO(Last in,First out) 及 FIFO(Fist in,First out) ## 開發環境 * Operating System : `Ubuntu 18.04 64bit Amd64版本` * Compiler : `gcc 8.1.0 ` ## 測試結果 ![](https://i.imgur.com/Peq0ze9.png) :::danger 文字訊息==不要==用圖片展現 :notes: jserv ::: * 100分的狀態但相信仍
     Like  Bookmark