[M3commit] CVS Update: cm3

Jay K jay.krell at cornell.edu
Sun Sep 13 15:10:10 CEST 2009


I find it too painful to find diffs given a checkin mail, so here:

 

Index: src/thread/POSIX/ThreadF.i3
===================================================================
RCS file: /usr/cvs/cm3/m3-libs/m3core/src/thread/POSIX/ThreadF.i3,v
retrieving revision 1.15
diff -u -r1.15 ThreadF.i3
--- src/thread/POSIX/ThreadF.i3 8 Sep 2009 16:41:38 -0000 1.15
+++ src/thread/POSIX/ThreadF.i3 13 Sep 2009 13:05:22 -0000
@@ -66,13 +66,6 @@
 PROCEDURE MyId(): Id RAISES {};
 (* return Id of caller *)
 
-(*------------------------------------------------------------ preemption ---*)
-
-PROCEDURE SetSwitchingInterval (usec: CARDINAL);
-(* Sets the time between thread preemptions to 'usec' microseconds.
-   Note that most Unix systems dont guarantee much if any precision
-   on timer interrupts.  The default value is 100 milliseconds. *)
-
 (*---------------------------------------------------- exception delivery ---*)
 
 PROCEDURE GetCurrentHandlers(): ADDRESS;
Index: src/thread/POSIX/ThreadPosix.m3
===================================================================
RCS file: /usr/cvs/cm3/m3-libs/m3core/src/thread/POSIX/ThreadPosix.m3,v
retrieving revision 1.44
diff -u -r1.44 ThreadPosix.m3
--- src/thread/POSIX/ThreadPosix.m3 12 Sep 2009 17:55:32 -0000 1.44
+++ src/thread/POSIX/ThreadPosix.m3 13 Sep 2009 13:05:22 -0000
@@ -767,15 +767,6 @@
     IF inCritical = 0 AND heapState.inCritical = 0 THEN InternalYield () END;
   END switch_thread;
 
-PROCEDURE SetSwitchingInterval (usec: CARDINAL) =
-  BEGIN
-    INC (inCritical);
-      selected_interval.tv_sec  := usec DIV 1000000;
-      selected_interval.tv_usec := usec MOD 1000000;
-    DEC (inCritical);
-    IF multipleThreads THEN StartSwitching () END;
-  END SetSwitchingInterval;
-
 (*------------------------------------------------------------- scheduler ---*)
 
 PROCEDURE CanRun (t: T) = 
Index: src/thread/PTHREAD/ThreadF.i3
===================================================================
RCS file: /usr/cvs/cm3/m3-libs/m3core/src/thread/PTHREAD/ThreadF.i3,v
retrieving revision 1.17
diff -u -r1.17 ThreadF.i3
--- src/thread/PTHREAD/ThreadF.i3 8 Sep 2009 16:41:38 -0000 1.17
+++ src/thread/PTHREAD/ThreadF.i3 13 Sep 2009 13:05:22 -0000
@@ -24,11 +24,6 @@
    of the stack.  All other threads must be suspended.  ProcessStacks
    exists solely for the garbage collector.  *)
 
-PROCEDURE ProcessEachStack (p: PROCEDURE (start, stop: ADDRESS));
-(* Apply p to each thread stack, with [start..stop) being the limits
-   of the stack.  Each thread is suspended individually.  ProcessEachStack
-   exists solely for the garbage collector.  *)
-
 (*------------------------------------------------ floating point support ---*)
 
 (* access to the saved floating point state for the current thread. *)
Index: src/thread/PTHREAD/ThreadPThread.m3
===================================================================
RCS file: /usr/cvs/cm3/m3-libs/m3core/src/thread/PTHREAD/ThreadPThread.m3,v
retrieving revision 1.138
diff -u -r1.138 ThreadPThread.m3
--- src/thread/PTHREAD/ThreadPThread.m3 13 Sep 2009 04:55:33 -0000 1.138
+++ src/thread/PTHREAD/ThreadPThread.m3 13 Sep 2009 13:05:22 -0000
@@ -995,55 +995,6 @@
     END;
   END ProcessStacks;
 
-PROCEDURE ProcessEachStack (p: PROCEDURE (start, stop: ADDRESS)) =
-  (* LL=0 *)
-  VAR
-    me := GetActivation();
-    act: Activation;
-    acks: int;
-  BEGIN
-    WITH r = pthread_mutex_lock_active() DO <*ASSERT r=0*> END;
-
-    ProcessMe(me, p);
-
-    act := me.next;
-    WHILE act # me DO
-      (* stop *)
-      LOOP
-        IF StopThread(act) THEN EXIT END;
-        IF SignalThread(act, ActState.Stopping) THEN
-          WITH r = sem_getvalue(acks) DO <*ASSERT r=0*> END;
-          IF acks > 0 THEN
-            WHILE sem_wait() # 0 DO
-              <*ASSERT Cerrno.GetErrno() = Uerror.EINTR*>
-            END;
-            EXIT;
-          END;
-        END;
-        CommonSleep();
-      END;
-      (* process *)
-      ProcessOther(act, p);
-      (* start *)
-      LOOP
-        IF StartThread(act) THEN EXIT END;
-        IF SignalThread(act, ActState.Starting) THEN
-          WITH r = sem_getvalue(acks) DO <*ASSERT r=0*> END;
-          IF acks > 0 THEN
-            WHILE sem_wait() # 0 DO
-              <*ASSERT Cerrno.GetErrno() = Uerror.EINTR*>
-            END;
-            EXIT;
-          END;
-        END;
-        CommonSleep();
-      END;
-      act := act.next;
-    END;
-
-    WITH r = pthread_mutex_unlock_active() DO <*ASSERT r=0*> END;
-  END ProcessEachStack;
-
 PROCEDURE ProcessMe (me: Activation;  p: PROCEDURE (start, stop: ADDRESS)) =
   (* LL=activeMu *)
   VAR
Index: src/thread/WIN32/ThreadF.i3
===================================================================
RCS file: /usr/cvs/cm3/m3-libs/m3core/src/thread/WIN32/ThreadF.i3,v
retrieving revision 1.17
diff -u -r1.17 ThreadF.i3
--- src/thread/WIN32/ThreadF.i3 8 Sep 2009 16:41:39 -0000 1.17
+++ src/thread/WIN32/ThreadF.i3 13 Sep 2009 13:05:22 -0000
@@ -26,12 +26,6 @@
 (* Feature:  Windows threads not created by Thread.Fork are not suspended
     or resumed, and their stacks are not processed. *)
 
-(*------------------------------------------------------------ preemption ---*)
-
-PROCEDURE SetSwitchingInterval (usec: CARDINAL);
-(* Sets the time between thread preemptions to 'usec' microseconds.
-   This procedure is a no-op on Windows/NT. *)
-
 (*------------------------------------------------------------ thread IDs ---*)
 
 TYPE
Index: src/thread/WIN32/ThreadWin32.m3
===================================================================
RCS file: /usr/cvs/cm3/m3-libs/m3core/src/thread/WIN32/ThreadWin32.m3,v
retrieving revision 1.47
diff -u -r1.47 ThreadWin32.m3
--- src/thread/WIN32/ThreadWin32.m3 8 Sep 2009 16:41:39 -0000 1.47
+++ src/thread/WIN32/ThreadWin32.m3 13 Sep 2009 13:05:22 -0000
@@ -695,12 +695,6 @@
     RETURN res;
   END AlertJoin;
 
-(*------------------------------------------------ timer-based preemption ---*)
-
-PROCEDURE SetSwitchingInterval (<*UNUSED*> usec: CARDINAL) =
-  BEGIN
-  END SetSwitchingInterval;
-
 (*---------------------------------------------------- Scheduling support ---*)
 
 PROCEDURE Pause(n: LONGREAL) =






 
> Date: Sun, 13 Sep 2009 15:08:01 +0000
> To: m3commit at elegosoft.com
> From: jkrell at elego.de
> Subject: [M3commit] CVS Update: cm3
> 
> CVSROOT: /usr/cvs
> Changes by: jkrell at birch. 09/09/13 15:08:01
> 
> Modified files:
> cm3/m3-libs/m3core/src/thread/POSIX/: ThreadF.i3 ThreadPosix.m3 
> cm3/m3-libs/m3core/src/thread/PTHREAD/: ThreadF.i3 
> ThreadPThread.m3 
> cm3/m3-libs/m3core/src/thread/WIN32/: ThreadF.i3 ThreadWin32.m3 
> 
> Log message:
> remove SetSwitchingInterval
> It didn't do anything on NT and wasn't declared for pthread.
> For greater source compat we could put it in and have it do
> nothing for NT and pthread, but we are already getting on
> without it in pthread.
> 
> remove ProcessEachStack
> It is only in pthread and never used.
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3commit/attachments/20090913/86f030bd/attachment-0002.html>


More information about the M3commit mailing list