> Sure. That's a completely different issue. But this works:
>
> extern int b;
> int *a = &b;
> int b = 20;
>
> int main(void)
> {
> return 0;
> }
>
> and that's what the code you refer do does.
Yes, that make sense, thanks very much :-)
--
Rock Lee
___
On 2015/9/10 15:55, valdis.kletni...@vt.edu wrote:
> On Thu, 10 Sep 2015 15:09:42 +0800, Rock Lee said:
>
>> union thread_union init_thread_union __init_task_data =
>>
>> { INIT_THREAD_INFO(init_task) };
>
> 'gcc -E' to see what this expands to. All may not be as it seems. :)
>
Thanks, I us
Rock Lee writes:
>> Rock Lee writes:
>>
>>> Hi, all:
>>> Here is a snippet of linux-v3.4 which drives me crazy.
>>> Because init_task hasn't been declared yet when init_thread_union is
>>> initializing. Why is there no compiling error? Any hint would be helpful.
>>>
>>> union thread_union in
> Rock Lee writes:
>
>> Hi, all:
>> Here is a snippet of linux-v3.4 which drives me crazy.
>> Because init_task hasn't been declared yet when init_thread_union is
>> initializing. Why is there no compiling error? Any hint would be helpful.
>>
>> union thread_union init_thread_union __init_tas
Rock Lee writes:
> Hi, all:
> Here is a snippet of linux-v3.4 which drives me crazy.
> Because init_task hasn't been declared yet when init_thread_union is
> initializing. Why is there no compiling error? Any hint would be helpful.
>
> union thread_union init_thread_union __init_task_data
On Thu, 10 Sep 2015 15:09:42 +0800, Rock Lee said:
> union thread_union init_thread_union __init_task_data =
>
> { INIT_THREAD_INFO(init_task) };
'gcc -E' to see what this expands to. All may not be as it seems. :)
pgpbElrwkwUP7.pgp
Description: PGP signature
_
Hi, all:
Here is a snippet of linux-v3.4 which drives me crazy.
Because init_task hasn't been declared yet when init_thread_union is
initializing. Why is there no compiling error? Any hint would be helpful.
union thread_union init_thread_union __init_task_data =
{ INIT_THREAD_INFO(