Commit b9ee7e8a authored by Austin Seipp's avatar Austin Seipp
Browse files

rts: detabify/dewhitespace RtsAPI.c


Signed-off-by: default avatarAustin Seipp <austin@well-typed.com>
parent 8f3611ef
...@@ -367,9 +367,9 @@ rts_getBool (HaskellObj p) ...@@ -367,9 +367,9 @@ rts_getBool (HaskellObj p)
info = get_itbl((StgClosure *)UNTAG_CLOSURE(p)); info = get_itbl((StgClosure *)UNTAG_CLOSURE(p));
if (info->srt_bitmap == 0) { // srt_bitmap is the constructor tag if (info->srt_bitmap == 0) { // srt_bitmap is the constructor tag
return 0; return 0;
} else { } else {
return 1; return 1;
} }
} }
...@@ -429,7 +429,7 @@ void rts_eval (/* inout */ Capability **cap, ...@@ -429,7 +429,7 @@ void rts_eval (/* inout */ Capability **cap,
/* out */ HaskellObj *ret) /* out */ HaskellObj *ret)
{ {
StgTSO *tso; StgTSO *tso;
tso = createGenThread(*cap, RtsFlags.GcFlags.initialStkSize, p); tso = createGenThread(*cap, RtsFlags.GcFlags.initialStkSize, p);
scheduleWaitThread(tso,ret,cap); scheduleWaitThread(tso,ret,cap);
} }
...@@ -453,8 +453,8 @@ void rts_evalIO (/* inout */ Capability **cap, ...@@ -453,8 +453,8 @@ void rts_evalIO (/* inout */ Capability **cap,
/* in */ HaskellObj p, /* in */ HaskellObj p,
/* out */ HaskellObj *ret) /* out */ HaskellObj *ret)
{ {
StgTSO* tso; StgTSO* tso;
tso = createStrictIOThread(*cap, RtsFlags.GcFlags.initialStkSize, p); tso = createStrictIOThread(*cap, RtsFlags.GcFlags.initialStkSize, p);
scheduleWaitThread(tso,ret,cap); scheduleWaitThread(tso,ret,cap);
} }
...@@ -482,8 +482,8 @@ void rts_evalStableIO (/* inout */ Capability **cap, ...@@ -482,8 +482,8 @@ void rts_evalStableIO (/* inout */ Capability **cap,
stat = rts_getSchedStatus(*cap); stat = rts_getSchedStatus(*cap);
if (stat == Success && ret != NULL) { if (stat == Success && ret != NULL) {
ASSERT(r != NULL); ASSERT(r != NULL);
*ret = getStablePtr((StgPtr)r); *ret = getStablePtr((StgPtr)r);
} }
} }
...@@ -519,12 +519,12 @@ rts_checkSchedStatus (char* site, Capability *cap) ...@@ -519,12 +519,12 @@ rts_checkSchedStatus (char* site, Capability *cap)
SchedulerStatus rc = cap->running_task->incall->stat; SchedulerStatus rc = cap->running_task->incall->stat;
switch (rc) { switch (rc) {
case Success: case Success:
return; return;
case Killed: case Killed:
errorBelch("%s: uncaught exception",site); errorBelch("%s: uncaught exception",site);
stg_exit(EXIT_FAILURE); stg_exit(EXIT_FAILURE);
case Interrupted: case Interrupted:
errorBelch("%s: interrupted", site); errorBelch("%s: interrupted", site);
#ifdef THREADED_RTS #ifdef THREADED_RTS
// The RTS is shutting down, and the process will probably // The RTS is shutting down, and the process will probably
// soon exit. We don't want to preempt the shutdown // soon exit. We don't want to preempt the shutdown
...@@ -536,8 +536,8 @@ rts_checkSchedStatus (char* site, Capability *cap) ...@@ -536,8 +536,8 @@ rts_checkSchedStatus (char* site, Capability *cap)
stg_exit(EXIT_FAILURE); stg_exit(EXIT_FAILURE);
#endif #endif
default: default:
errorBelch("%s: Return code (%d) not ok",(site),(rc)); errorBelch("%s: Return code (%d) not ok",(site),(rc));
stg_exit(EXIT_FAILURE); stg_exit(EXIT_FAILURE);
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment