[commit: ghc] master: RTS: Rename InCall.stat struct field to .rstat (cd9f3bf)

git at git.haskell.org git at git.haskell.org
Fri Dec 4 09:12:09 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/cd9f3bf9b8068fc52bb61bc3badcc1c753fbd14b/ghc

>---------------------------------------------------------------

commit cd9f3bf9b8068fc52bb61bc3badcc1c753fbd14b
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date:   Fri Dec 4 10:10:55 2015 +0100

    RTS: Rename InCall.stat struct field to .rstat
    
    On AIX, C system headers can redirect the token `stat` via
    
        #define stat stat64
    
    to provide large-file support. Simply avoiding the use of `stat` as an
    identifier eschews macro-replacement.
    
    Differential Revision: https://phabricator.haskell.org/D1566


>---------------------------------------------------------------

cd9f3bf9b8068fc52bb61bc3badcc1c753fbd14b
 rts/RtsAPI.c   |  4 ++--
 rts/Schedule.c | 12 ++++++------
 rts/Task.c     |  2 +-
 rts/Task.h     |  2 +-
 4 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/rts/RtsAPI.c b/rts/RtsAPI.c
index 2b3ad74..c64d8af 100644
--- a/rts/RtsAPI.c
+++ b/rts/RtsAPI.c
@@ -516,7 +516,7 @@ void rts_evalLazyIO_ (/* inout */ Capability **cap,
 void
 rts_checkSchedStatus (char* site, Capability *cap)
 {
-    SchedulerStatus rc = cap->running_task->incall->stat;
+    SchedulerStatus rc = cap->running_task->incall->rstat;
     switch (rc) {
     case Success:
         return;
@@ -544,7 +544,7 @@ rts_checkSchedStatus (char* site, Capability *cap)
 SchedulerStatus
 rts_getSchedStatus (Capability *cap)
 {
-    return cap->running_task->incall->stat;
+    return cap->running_task->incall->rstat;
 }
 
 Capability *
diff --git a/rts/Schedule.c b/rts/Schedule.c
index abbc363..e3dd881 100644
--- a/rts/Schedule.c
+++ b/rts/Schedule.c
@@ -1293,19 +1293,19 @@ scheduleHandleThreadFinished (Capability *cap STG_UNUSED, Task *task, StgTSO *t)
                   // NOTE: return val is stack->sp[1] (see StgStartup.hc)
                   *(task->incall->ret) = (StgClosure *)task->incall->tso->stackobj->sp[1];
               }
-              task->incall->stat = Success;
+              task->incall->rstat = Success;
           } else {
               if (task->incall->ret) {
                   *(task->incall->ret) = NULL;
               }
               if (sched_state >= SCHED_INTERRUPTING) {
                   if (heap_overflow) {
-                      task->incall->stat = HeapExhausted;
+                      task->incall->rstat = HeapExhausted;
                   } else {
-                      task->incall->stat = Interrupted;
+                      task->incall->rstat = Interrupted;
                   }
               } else {
-                  task->incall->stat = Killed;
+                  task->incall->rstat = Killed;
               }
           }
 #ifdef DEBUG
@@ -2351,7 +2351,7 @@ scheduleWaitThread (StgTSO* tso, /*[out]*/HaskellObj* ret, Capability **pcap)
 
     task->incall->tso = tso;
     task->incall->ret = ret;
-    task->incall->stat = NoStatus;
+    task->incall->rstat = NoStatus;
 
     appendToRunQueue(cap,tso);
 
@@ -2360,7 +2360,7 @@ scheduleWaitThread (StgTSO* tso, /*[out]*/HaskellObj* ret, Capability **pcap)
 
     cap = schedule(cap,task);
 
-    ASSERT(task->incall->stat != NoStatus);
+    ASSERT(task->incall->rstat != NoStatus);
     ASSERT_FULL_CAPABILITY_INVARIANTS(cap,task);
 
     debugTrace(DEBUG_sched, "bound thread (%lu) finished", (unsigned long)id);
diff --git a/rts/Task.c b/rts/Task.c
index be72c1b..82f7780 100644
--- a/rts/Task.c
+++ b/rts/Task.c
@@ -264,7 +264,7 @@ newInCall (Task *task)
     incall->task = task;
     incall->suspended_tso = NULL;
     incall->suspended_cap = NULL;
-    incall->stat          = NoStatus;
+    incall->rstat         = NoStatus;
     incall->ret           = NULL;
     incall->next = NULL;
     incall->prev = NULL;
diff --git a/rts/Task.h b/rts/Task.h
index 58798bd..817a99a 100644
--- a/rts/Task.h
+++ b/rts/Task.h
@@ -94,7 +94,7 @@ typedef struct InCall_ {
                                 // without owning a Capability in the
                                 // first place.
 
-    SchedulerStatus  stat;      // return status
+    SchedulerStatus  rstat;     // return status
     StgClosure **    ret;       // return value
 
     struct Task_ *task;



More information about the ghc-commits mailing list