Koo*_* Ng 6 c linux arrays struct
55 typedef struct pidmap {
56 atomic_t nr_free;
57 void *page;
58 } pidmap_t;
59
60 static pidmap_t pidmap_array[PIDMAP_ENTRIES] =
61 { [ 0 ... PIDMAP_ENTRIES-1 ] = { ATOMIC_INIT(BITS_PER_PAGE), NULL } };
Run Code Online (Sandbox Code Playgroud)
上面的代码片段显示了我在Linux内核源代码中找到的结构数组的初始化.我之前从未见过这种形式的初始化,我无法自己模拟同样的事情.我到底错过了什么?