成員,我有以下結構:結構與工會:結構沒有名爲
struct sched_param {
union {
int sched_priority;
struct lshort_sched_param lshort_params;
};
};
struct lshort_sched_param {
int requested_time;
int level;
};
每當我做一個sched_param param1
結構和嘗試更新param1.sched_priority
場我得到寫的主題中的消息。
struct sched_param param1;
param1.sched_priority = 1;
但是,每當我做一個sched_param param2
並嘗試更新它的工作好param2.lshort_params.level
。
struct sched_param param2;
param2.lshort_params.level= 1;
可能是什麼原因?
你需要給工會的標識符,因此它可以被稱爲。 – user3629249 2014-12-01 22:39:02
這是一個在家庭作業中給我們的結構,所以我不能給這個聯盟起個名字。還有其他解決方案嗎? – 2014-12-01 22:54:40