Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
GHC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex D
GHC
Commits
c8335469
Commit
c8335469
authored
Jul 25, 2012
by
Ian Lynagh
Browse files
Options
Browse Files
Download
Plain Diff
Merge commit '
c859d17f
'
parents
5d2a1e65
c859d17f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
21 deletions
+7
-21
rts/Capability.c
rts/Capability.c
+2
-2
rts/Task.c
rts/Task.c
+4
-18
rts/Task.h
rts/Task.h
+1
-1
No files found.
rts/Capability.c
View file @
c8335469
...
...
@@ -417,9 +417,9 @@ giveCapabilityToTask (Capability *cap USED_IF_DEBUG, Task *task)
{
ASSERT_LOCK_HELD
(
&
cap
->
lock
);
ASSERT
(
task
->
cap
==
cap
);
debugTrace
(
DEBUG_sched
,
"passing capability %d to %s %
p"
,
debugTrace
(
DEBUG_sched
,
"passing capability %d to %s %
#"
FMT_HexWord64
,
cap
->
no
,
task
->
incall
->
tso
?
"bound task"
:
"worker"
,
(
void
*
)(
size_t
)
task
->
id
);
serialisableTaskId
(
task
)
);
ACQUIRE_LOCK
(
&
task
->
lock
);
if
(
task
->
wakeup
==
rtsFalse
)
{
task
->
wakeup
=
rtsTrue
;
...
...
rts/Task.c
View file @
c8335469
...
...
@@ -395,22 +395,6 @@ workerTaskStop (Task *task)
#endif
#ifdef DEBUG
// We don't replace this function with serialisableTaskId,
// because debug prints as pointers are more readable than random
// 64-bit intergers (especially on 32-bit architectures)
// and because we want to use this function also for non-threaded RTS.
static
void
*
taskId
(
Task
*
task
)
{
#ifdef THREADED_RTS
return
(
void
*
)(
size_t
)
task
->
id
;
#else
return
(
void
*
)
task
;
#endif
}
#endif
#if defined(THREADED_RTS)
static
void
OSThreadProcAttr
...
...
@@ -483,7 +467,8 @@ interruptWorkerTask (Task *task)
ASSERT
(
osThreadId
()
!=
task
->
id
);
// seppuku not allowed
ASSERT
(
task
->
incall
->
suspended_tso
);
// use this only for FFI calls
interruptOSThread
(
task
->
id
);
debugTrace
(
DEBUG_sched
,
"interrupted worker task %p"
,
taskId
(
task
));
debugTrace
(
DEBUG_sched
,
"interrupted worker task %#"
FMT_HexWord64
,
serialisableTaskId
(
task
));
}
#endif
/* THREADED_RTS */
...
...
@@ -497,7 +482,8 @@ printAllTasks(void)
{
Task
*
task
;
for
(
task
=
all_tasks
;
task
!=
NULL
;
task
=
task
->
all_next
)
{
debugBelch
(
"task %p is %s, "
,
taskId
(
task
),
task
->
stopped
?
"stopped"
:
"alive"
);
debugBelch
(
"task %#"
FMT_HexWord64
" is %s, "
,
serialisableTaskId
(
task
),
task
->
stopped
?
"stopped"
:
"alive"
);
if
(
!
task
->
stopped
)
{
if
(
task
->
cap
)
{
debugBelch
(
"on capability %d, "
,
task
->
cap
->
no
);
...
...
rts/Task.h
View file @
c8335469
...
...
@@ -312,7 +312,7 @@ serialisableTaskId (Task *task
#if defined(THREADED_RTS)
return
serialiseTaskId
(
task
->
id
);
#else
return
1
;
return
(
TaskId
)
(
size_t
)
task
;
#endif
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment