Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
51a21838
Commit
51a21838
authored
Dec 07, 2010
by
Keith Rarick
Committed by
Russ Cox
Dec 07, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
runtime: add Goroutines
R=rsc CC=golang-dev
https://golang.org/cl/3508041
parent
63544c47
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
debug.go
src/pkg/runtime/debug.go
+3
-0
proc.c
src/pkg/runtime/proc.c
+7
-0
No files found.
src/pkg/runtime/debug.go
View file @
51a21838
...
...
@@ -26,6 +26,9 @@ func GOMAXPROCS(n int) int
// Cgocalls returns the number of cgo calls made by the current process.
func
Cgocalls
()
int64
// Goroutines returns the number of goroutines that currently exist.
func
Goroutines
()
int32
type
MemStatsType
struct
{
// General statistics.
// Not locked during update; approximate.
...
...
src/pkg/runtime/proc.c
View file @
51a21838
...
...
@@ -1192,3 +1192,10 @@ runtime·mid(uint32 ret)
ret
=
m
->
id
;
FLUSH
(
&
ret
);
}
void
runtime
·
Goroutines
(
int32
ret
)
{
ret
=
runtime
·
sched
.
gcount
;
FLUSH
(
&
ret
);
}
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