Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GHC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gesh
GHC
Commits
a73c4059
Commit
a73c4059
authored
26 years ago
by
sof
Browse files
Options
Downloads
Patches
Plain Diff
[project @ 1998-11-09 11:14:38 by sof]
Provide RTS initialisation as sep. entry point, initRTS()
parent
33a2c36d
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ghc/runtime/main/main.lc
+21
-4
21 additions, 4 deletions
ghc/runtime/main/main.lc
with
21 additions
and
4 deletions
ghc/runtime/main/main.lc
+
21
−
4
View file @
a73c4059
...
...
@@ -14,6 +14,10 @@
#include "rtsdefs.h"
#include <setjmp.h>
#if 1
#include <windows.h>
#endif
#if defined(STDC_HEADERS) || defined(HAVE_STRING_H)
# include <string.h>
/* An ANSI string.h and pre-ANSI memory.h might conflict. */
...
...
@@ -99,8 +103,15 @@ jmp_buf restart_main; /* For restarting after a signal */
int nPEs = 0; /* Number of PEs */
#endif
int /* return type of "main" is defined by the C standard */
main(int argc, char *argv[])
\end{code}
Setting up and initialising the run-time system:
(used by main(), and people that don't allow Haskell
to stay in control.)
\begin{code}
void
initRTS(int argc, char *argv[])
{
#ifdef GRAN
int i;
...
...
@@ -124,7 +135,6 @@ Manager's requirements.
if (*argv[0] == '-') { /* Look to see whether we're the Main Thread */
IAmMainThread = rtsTrue;
argv++; argc--; /* Strip off flag argument */
/* fprintf(stderr, "I am Main Thread\n"); */
}
/*
* Grab the number of PEs out of the argument vector, and
...
...
@@ -151,7 +161,6 @@ Manager's requirements.
what statsfile to use (if any); [if so, write the whole
cmd-line into it]
This is unlikely to work well in parallel! KH.
*/
initRtsFlagsDefaults();
defaultsHook(); /* the one supplied does nothing;
...
...
@@ -264,6 +273,14 @@ Manager's requirements.
initUserSignals();
#endif
}
int /* return type of "main" is defined by the C standard */
main(int argc, char *argv[])
{
initRTS(argc,argv);
#ifdef CONCURRENT
AvailableStack = AvailableTSO = PrelBase_Z91Z93_closure;
# if defined(GRAN) /* HWL */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment