aboutsummaryrefslogtreecommitdiffstats
path: root/src/thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/thread.c')
-rw-r--r--src/thread.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/thread.c b/src/thread.c
index 8a6a2de18be..4c98d590b7a 100644
--- a/src/thread.c
+++ b/src/thread.c
@@ -83,6 +83,22 @@ release_global_lock (void)
83 sys_mutex_unlock (&global_lock); 83 sys_mutex_unlock (&global_lock);
84} 84}
85 85
86static void
87rebind_for_thread_switch (void)
88{
89 ptrdiff_t distance
90 = current_thread->m_specpdl_ptr - current_thread->m_specpdl;
91 specpdl_unrewind (specpdl_ptr, -distance, true);
92}
93
94static void
95unbind_for_thread_switch (struct thread_state *thr)
96{
97 ptrdiff_t distance = thr->m_specpdl_ptr - thr->m_specpdl;
98 specpdl_unrewind (thr->m_specpdl_ptr, distance, true);
99}
100
101
86/* You must call this after acquiring the global lock. 102/* You must call this after acquiring the global lock.
87 acquire_global_lock does it for you. */ 103 acquire_global_lock does it for you. */
88static void 104static void