diff options
author | Herbert Valerio Riedel <hvr@gnu.org> | 2015-12-04 10:10:55 +0100 |
---|---|---|
committer | Herbert Valerio Riedel <hvr@gnu.org> | 2015-12-04 10:11:30 +0100 |
commit | cd9f3bf9b8068fc52bb61bc3badcc1c753fbd14b (patch) | |
tree | 25dbae71a23f60a8d0d4aded1b92adddcbe168d7 /rts | |
parent | 7af29da05d2e5a5e311a5f73f20d0f232035973b (diff) | |
download | haskell-cd9f3bf9b8068fc52bb61bc3badcc1c753fbd14b.tar.gz |
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
Diffstat (limited to 'rts')
-rw-r--r-- | rts/RtsAPI.c | 4 | ||||
-rw-r--r-- | rts/Schedule.c | 12 | ||||
-rw-r--r-- | rts/Task.c | 2 | ||||
-rw-r--r-- | rts/Task.h | 2 |
4 files changed, 10 insertions, 10 deletions
diff --git a/rts/RtsAPI.c b/rts/RtsAPI.c index 2b3ad74a17..c64d8af2e4 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 abbc363523..e3dd88151c 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 be72c1bd23..82f7780654 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 58798bd24d..817a99a543 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; |