[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

where to set the initial value to %gs ?



I read code from __pthread_create_2_1()--> create_thread() 
 42   desc.vals[0] = TLS_GET_GS () >> 3;
It gets the current LDT entry number from %gs of current thread, but where
to set the initial value to %gs?
I checked do_fork() in kernel 2.5.48, only found a related line:
298         savesegment(gs,p->thread.gs);
but still no idea where to set the initial value to %gs?

any hints? TIA. 

  Boris
=========================
To know what I don't know
To learn what I don't know
To contribute what I know
=========================









[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]