CVS: sml/src/runtime/kernel ml-state.c,1.3,1.4 run-ml.c,1.5,1.6
John Reppy <[email protected]>
| Newsgroups | gmane.comp.lang.sml.smlnj.commits |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/smlnj/sml/src/runtime/kernel
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30184/kernel
Modified Files:
ml-state.c run-ml.c
Log Message:
New scheme for managing signals in the runtime system that should avoid
race conditions (thanks to Cynbe for the design).
Index: ml-state.c
===================================================================
RCS file: /cvsroot/smlnj/sml/src/runtime/kernel/ml-state.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** ml-state.c 1 Jun 2000 18:33:51 -0000 1.3
--- ml-state.c 3 May 2005 17:26:46 -0000 1.4
***************
*** 96,117 ****
int i;
! vsp->vp_heap = vsp->vp_state->ml_heap;
! vsp->vp_state->ml_vproc = vsp;
! vsp->vp_inMLFlag = FALSE;
! vsp->vp_handlerPending = FALSE;
! vsp->vp_inSigHandler = FALSE;
! vsp->vp_numPendingSysSigs = 0;
! vsp->vp_numPendingSigs = 0;
! vsp->vp_sigCode = 0;
! vsp->vp_sigCount = 0;
! vsp->vp_nextPendingSig = 0;
! vsp->vp_numInQ = 0;
! vsp->vp_gcSigState = ML_SIG_IGNORE;
! vsp->vp_gcTime0 = NEW_OBJ(Time_t);
! vsp->vp_gcTime = NEW_OBJ(Time_t);
! for (i = 0; i < NUM_SIGS; i++) {
! vsp->vp_pendingSigQ[i].sigNum = 0;
! vsp->vp_pendingSigQ[i].count = 0;
}
--- 96,116 ----
int i;
! vsp->vp_heap = vsp->vp_state->ml_heap;
! vsp->vp_state->ml_vproc = vsp;
! vsp->vp_inMLFlag = FALSE;
! vsp->vp_handlerPending = FALSE;
! vsp->vp_inSigHandler = FALSE;
! vsp->vp_totalSigCount.nReceived = 0;
! vsp->vp_totalSigCount.nHandled = 0;
! vsp->vp_sigCode = 0;
! vsp->vp_sigCount = 0;
! vsp->vp_nextPendingSig = MIN_SYSTEM_SIG;
! vsp->vp_gcSigState = ML_SIG_IGNORE;
! vsp->vp_gcTime0 = NEW_OBJ(Time_t);
! vsp->vp_gcTime = NEW_OBJ(Time_t);
! for (i = 0; i < SIGMAP_SZ; i++) {
! vsp->vp_sigCounts[i].nReceived = 0;
! vsp->vp_sigCounts[i].nHandled = 0;
}
Index: run-ml.c
===================================================================
RCS file: /cvsroot/smlnj/sml/src/runtime/kernel/run-ml.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** run-ml.c 16 May 2003 16:59:29 -0000 1.5
--- run-ml.c 3 May 2005 17:26:46 -0000 1.6
***************
*** 221,226 ****
case REQ_SIG_RETURN:
#ifdef SIGNAL_DEBUG
! SayDebug("REQ_SIG_RETURN: arg = %#x, pending = %d, inHandler = %d\n",
! msp->ml_arg, vsp->vp_handlerPending, vsp->vp_inSigHandler);
#endif
/* throw to the continuation */
--- 221,227 ----
case REQ_SIG_RETURN:
#ifdef SIGNAL_DEBUG
! SayDebug("REQ_SIG_RETURN: arg = %#x, pending = %d, inHandler = %d, nSigs = %d/%d\n",
! msp->ml_arg, vsp->vp_handlerPending, vsp->vp_inSigHandler,
! vsp->vp_totalSigCount.nHandled, vsp->vp_totalSigCount.nReceived);
#endif
/* throw to the continuation */
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20