avl_insert(criticaltree, n);
}
-static u1 *thread_checkcritical(u1 *mcodeptr)
+u1 *thread_checkcritical(u1 *mcodeptr)
{
const threadcritnode *n = findcritical(mcodeptr);
return (n && mcodeptr < n->mcodeend && mcodeptr > n->mcodebegin) ? n->mcoderestart : NULL;
sigset_t sigs;
void *critical;
-#ifdef __I386__
- if ((critical = thread_checkcritical((void*) ctx->uc_mcontext.gregs[REG_EIP])) != NULL)
- ctx->uc_mcontext.gregs[REG_EIP] = (long) critical;
-#endif
+ thread_restartcriticalsection(ctx);
sem_post(&suspend_ack);
} threadcritnode;
void thread_registercritical(threadcritnode *);
+u1 *thread_checkcritical(u1*);
extern volatile int stopworldwhere;
avl_insert(criticaltree, n);
}
-static u1 *thread_checkcritical(u1 *mcodeptr)
+u1 *thread_checkcritical(u1 *mcodeptr)
{
const threadcritnode *n = findcritical(mcodeptr);
return (n && mcodeptr < n->mcodeend && mcodeptr > n->mcodebegin) ? n->mcoderestart : NULL;
sigset_t sigs;
void *critical;
-#ifdef __I386__
- if ((critical = thread_checkcritical((void*) ctx->uc_mcontext.gregs[REG_EIP])) != NULL)
- ctx->uc_mcontext.gregs[REG_EIP] = (long) critical;
-#endif
+ thread_restartcriticalsection(ctx);
sem_post(&suspend_ack);
} threadcritnode;
void thread_registercritical(threadcritnode *);
+u1 *thread_checkcritical(u1*);
extern volatile int stopworldwhere;