|
22 | 22 | #include "TargetPtrs.h" |
23 | 23 | #include "yieldprocessornormalized.h" |
24 | 24 | #include <minipal/time.h> |
25 | | -#include <minipal/thread.h> |
26 | | -#include "asyncsafethreadmap.h" |
27 | 25 |
|
28 | 26 | #include "slist.inl" |
29 | 27 |
|
@@ -145,14 +143,6 @@ void ThreadStore::AttachCurrentThread(bool fAcquireThreadStoreLock) |
145 | 143 | pAttachingThread->m_ThreadStateFlags = Thread::TSF_Attached; |
146 | 144 |
|
147 | 145 | pTS->m_ThreadList.PushHead(pAttachingThread); |
148 | | - |
149 | | -#if defined(TARGET_UNIX) && !defined(TARGET_WASM) |
150 | | - if (!InsertThreadIntoAsyncSafeMap(pAttachingThread->m_threadId, pAttachingThread)) |
151 | | - { |
152 | | - PalPrintFatalError("\nFailed to insert thread into async-safe map due to out of memory.\n"); |
153 | | - RhFailFast(); |
154 | | - } |
155 | | -#endif // TARGET_UNIX && !TARGET_WASM |
156 | 146 | } |
157 | 147 |
|
158 | 148 | // static |
@@ -198,9 +188,6 @@ void ThreadStore::DetachCurrentThread() |
198 | 188 | pTS->m_ThreadList.RemoveFirst(pDetachingThread); |
199 | 189 | // tidy up GC related stuff (release allocation context, etc..) |
200 | 190 | pDetachingThread->Detach(); |
201 | | -#if defined(TARGET_UNIX) && !defined(TARGET_WASM) |
202 | | - RemoveThreadFromAsyncSafeMap(pDetachingThread->m_threadId, pDetachingThread); |
203 | | -#endif |
204 | 191 | } |
205 | 192 |
|
206 | 193 | // post-mortem clean up. |
@@ -365,13 +352,6 @@ EXTERN_C RuntimeThreadLocals* RhpGetThread() |
365 | 352 | return &tls_CurrentThread; |
366 | 353 | } |
367 | 354 |
|
368 | | -#if defined(TARGET_UNIX) && !defined(TARGET_WASM) |
369 | | -Thread * ThreadStore::GetCurrentThreadIfAvailableAsyncSafe() |
370 | | -{ |
371 | | - return (Thread*)FindThreadInAsyncSafeMap(minipal_get_current_thread_id_no_cache()); |
372 | | -} |
373 | | -#endif // TARGET_UNIX && !TARGET_WASM |
374 | | - |
375 | 355 | #endif // !DACCESS_COMPILE |
376 | 356 |
|
377 | 357 | #ifdef _WIN32 |
|
0 commit comments