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
Environments
Terraform modules
Monitor
Incidents
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
Alexander Kaznacheev
GHC
Commits
d031626e
Commit
d031626e
authored
23 years ago
by
sof
Browse files
Options
Downloads
Patches
Plain Diff
[project @ 2002-02-15 21:07:19 by sof]
comments only
parent
e3fc374f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ghc/rts/Capability.c
+2
-2
2 additions, 2 deletions
ghc/rts/Capability.c
ghc/rts/Capability.h
+7
-3
7 additions, 3 deletions
ghc/rts/Capability.h
with
9 additions
and
5 deletions
ghc/rts/Capability.c
+
2
−
2
View file @
d031626e
...
@@ -68,8 +68,8 @@ Condition thread_ready_cond = INIT_COND_VAR;
...
@@ -68,8 +68,8 @@ Condition thread_ready_cond = INIT_COND_VAR;
* the number of tasks currently blocked waiting on thread_ready_cond.
* the number of tasks currently blocked waiting on thread_ready_cond.
* (if > 0 => no need for a new task, just unblock an existing one).
* (if > 0 => no need for a new task, just unblock an existing one).
*
*
* waitForWork() takes care of keeping it up-to-date;
Task.startTask()
* waitForWork
Capability
() takes care of keeping it up-to-date;
* uses its current value.
*
Task.startTask()
uses its current value.
*/
*/
nat
rts_n_waiting_tasks
=
0
;
nat
rts_n_waiting_tasks
=
0
;
#endif
#endif
...
...
This diff is collapsed.
Click to expand it.
ghc/rts/Capability.h
+
7
−
3
View file @
d031626e
...
@@ -32,10 +32,14 @@ extern void initCapabilities(void);
...
@@ -32,10 +32,14 @@ extern void initCapabilities(void);
extern
void
grabCapability
(
Capability
**
pCap
);
extern
void
grabCapability
(
Capability
**
pCap
);
extern
void
releaseCapability
(
Capability
*
cap
);
extern
void
releaseCapability
(
Capability
*
cap
);
#if defined(RTS_SUPPORTS_THREADS)
/* total number of available capabilities */
extern
nat
rts_n_free_capabilities
;
extern
nat
rts_n_free_capabilities
;
extern
nat
rts_n_waiting_workers
;
#if defined(RTS_SUPPORTS_THREADS)
/* number of worker threads waiting to do good work within
the RTS. Used by Task.c (only) to determine whether or not
new worker threads needs to be created (when an external call
is made).
*/
extern
nat
rts_n_waiting_workers
;
/* used by Task.c to determine */
extern
void
grabReturnCapability
(
Mutex
*
pMutex
,
Capability
**
pCap
);
extern
void
grabReturnCapability
(
Mutex
*
pMutex
,
Capability
**
pCap
);
extern
void
yieldToReturningWorker
(
Mutex
*
pMutex
,
Capability
*
cap
);
extern
void
yieldToReturningWorker
(
Mutex
*
pMutex
,
Capability
*
cap
);
...
...
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