typedef struct _ut_slot {
ucontext_t uc;
....
}*ut_slot;
static ut_slot* table; //array of the structs
void foo (int tab_size){
table = malloc ( tab_size *(sizeof (ut_slot))); // memory allocation for array of structs
for(i = 0 ; i < tab_size ; i++ ){
getcontext(&table[i].uc); <--- ??????
}
}
「getcontext」文字列でエラーが発生します。配列の任意の要素への参照を書き込むにはどうすればよいですか?また、「getcontext」コマンドを使用して各配列要素の「uc」フィールドを初期化するにはどうすればよいですか?