MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / getLDT

Method getLDT

source/kernel/kthread.cpp:136–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134}
135
136struct user_desc* KThread::getLDT(U32 index) {
137 if (index>=TLS_ENTRY_START_INDEX && index<TLS_ENTRIES+TLS_ENTRY_START_INDEX) {
138 BOXEDWINE_CRITICAL_SECTION_WITH_MUTEX(tlsMutex);
139 return &this->tls[index-TLS_ENTRY_START_INDEX];
140 } else if (index<LDT_ENTRIES) {
141 return this->process->getLDT(index);
142 }
143 return nullptr;
144}
145
146void KThread::setTLS(struct user_desc* desc) {
147 BOXEDWINE_CRITICAL_SECTION_WITH_MUTEX(tlsMutex);

Callers 14

modify_ldtMethod · 0.95
callMethod · 0.45
jmpMethod · 0.45
larMethod · 0.45
lslMethod · 0.45
setSegmentMethod · 0.45
retMethod · 0.45
iretMethod · 0.45
verrMethod · 0.45
verwMethod · 0.45
setupFunction · 0.45
MovSwEwFunction · 0.45

Calls

no outgoing calls

Tested by 4

setupFunction · 0.36
MovSwEwFunction · 0.36
testPopSeg16Function · 0.36
testPopSeg32Function · 0.36