* src/vm/jit/powerpc/darwin/md-os.c (thread_restartcriticalsection):
authortwisti <none@none>
Wed, 30 May 2007 21:05:20 +0000 (21:05 +0000)
committertwisti <none@none>
Wed, 30 May 2007 21:05:20 +0000 (21:05 +0000)
Renamed to md_critical_section_restart.

src/vm/jit/powerpc/darwin/md-os.c

index eefc9930fad46cea978a39bfe2614c2261b0e8d1..f947e75981310929e81623b1b380ef17d5d0e205 100644 (file)
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   Contact: cacao@cacaojvm.org
-
-   Authors: Christian Thalinger
-
-   $Id: md-os.c 7770 2007-04-19 19:39:06Z twisti $
+   $Id: md-os.c 7990 2007-05-30 21:05:20Z twisti $
 
 */
 
@@ -222,20 +218,30 @@ void md_signal_handler_sigusr2(int sig, siginfo_t *siginfo, void *_p)
 }
 
 
+/* md_critical_section_restart *************************************************
+
+   Search the critical sections tree for a matching section and set
+   the PC to the restart point, if necessary.
+
+*******************************************************************************/
+
 #if defined(ENABLE_THREADS)
-void thread_restartcriticalsection(ucontext_t *_uc)
+void md_critical_section_restart(ucontext_t *_uc)
 {
        mcontext_t          _mc;
        ppc_thread_state_t *_ss;
-       void               *critical;
+       u1                 *pc;
+       u1                 *npc;
 
        _mc = _uc->uc_mcontext;
        _ss = &_mc->ss;
 
-       critical = critical_find_restart_point((void *) _ss->srr0);
+       pc = (u1 *) _ss->srr0;
+
+       npc = critical_find_restart_point(pc);
 
-       if (critical)
-               _ss->srr0 = (ptrint) critical;
+       if (npc != NULL)
+               _ss->srr0 = (ptrint) npc;
 }
 #endif