Changeset 15131
- Timestamp:
- Dec 11, 2011, 7:52:51 PM (13 years ago)
- File:
-
- 1 edited
-
trunk/source/lisp-kernel/thread_manager.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/lisp-kernel/thread_manager.c
r15095 r15131 87 87 /* What if the suspend count is > 1 at this point ? I don't think 88 88 that that matters, but I'm not sure */ 89 pcontext->ContextFlags = CONTEXT_ ALL;89 pcontext->ContextFlags = CONTEXT_FULL; 90 90 rc = GetThreadContext(hthread, pcontext); 91 91 if (rc == 0) { … … 788 788 TCR_AUX(next)->prev = prev; 789 789 TCR_AUX(tcr)->prev = TCR_AUX(tcr)->next = NULL; 790 #ifdef X86 64790 #ifdef X86 791 791 tcr->linear = NULL; 792 792 #endif … … 1900 1900 TCR *current = current_tcr; 1901 1901 #elif defined(WIN_32) 1902 TCR *current = ( TCR *)((char *)NtCurrentTeb() + TCR_BIAS);1902 TCR *current = ((TCR *)((char *)NtCurrentTeb() + TCR_BIAS))->linear; 1903 1903 #else 1904 1904 void *tsd = (void *)tsd_get(lisp_global(TCR_KEY)); … … 2020 2020 return false; 2021 2021 } 2022 pcontext->ContextFlags = CONTEXT_ ALL;2022 pcontext->ContextFlags = CONTEXT_FULL; 2023 2023 rc = GetThreadContext(hthread, pcontext); 2024 2024 if (rc == 0) { … … 2027 2027 where = (pc)(xpPC(pcontext)); 2028 2028 2029 if ((where >= restore_windows_context_start) && 2030 (where < restore_windows_context_end) && 2031 (tcr->valence != TCR_STATE_LISP)) { 2032 Bug(NULL, "Forgot about this case ..."); 2033 } 2029 2034 if (tcr->valence == TCR_STATE_LISP) { 2030 2035 if ((where >= restore_windows_context_start) && … … 2061 2066 ResumeThread(hthread); 2062 2067 SEM_WAIT_FOREVER(TCR_AUX(tcr)->suspend); 2063 SuspendThread(hthread); 2064 /* The thread is either waiting for its resume semaphore to 2065 be signaled or is about to wait. Signal it now, while 2066 the thread's suspended. */ 2067 SEM_RAISE(TCR_AUX(tcr)->resume); 2068 pcontext->ContextFlags = CONTEXT_ALL; 2069 GetThreadContext(hthread, pcontext); 2068 pcontext = NULL; 2070 2069 } 2071 2070 } … … 2194 2193 HANDLE hthread = (HANDLE)(TCR_AUX(tcr)->osid); 2195 2194 2195 2196 TCR_AUX(tcr)->suspend_context = NULL; 2196 2197 if (context) { 2197 context->ContextFlags = CONTEXT_ALL; 2198 TCR_AUX(tcr)->suspend_context = NULL; 2199 SetThreadContext(hthread,context); 2198 if (tcr->valence == TCR_STATE_LISP) { 2199 rc = SetThreadContext(hthread,context); 2200 if (! rc) { 2201 Bug(NULL,"SetThreadContext"); 2202 return false; 2203 } 2204 } 2200 2205 rc = ResumeThread(hthread); 2201 2206 if (rc == -1) { 2202 wperror("ResumeThread");2207 Bug(NULL,"ResumeThread"); 2203 2208 return false; 2204 2209 } 2210 return true; 2211 } else { 2212 SEM_RAISE(TCR_AUX(tcr)->resume); 2205 2213 return true; 2206 2214 }
Note:
See TracChangeset
for help on using the changeset viewer.
