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
ff7d7b27
Commit
ff7d7b27
authored
Feb 14, 2011
by
Alex Brainman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
runtime: detect failed thread creation on Windows
Fixes #1495. R=rsc CC=golang-dev
https://golang.org/cl/4182047
parent
29ae8e9a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
thread.c
src/pkg/runtime/windows/thread.c
+7
-1
No files found.
src/pkg/runtime/windows/thread.c
View file @
ff7d7b27
...
...
@@ -184,11 +184,17 @@ runtime·notesleep(Note *n)
void
runtime
·
newosproc
(
M
*
m
,
G
*
g
,
void
*
stk
,
void
(
*
fn
)(
void
))
{
void
*
thandle
;
USED
(
stk
);
USED
(
g
);
// assuming g = m->g0
USED
(
fn
);
// assuming fn = mstart
runtime
·
stdcall
(
runtime
·
CreateThread
,
6
,
0
,
0
,
runtime
·
tstart_stdcall
,
m
,
0
,
0
);
thandle
=
runtime
·
stdcall
(
runtime
·
CreateThread
,
6
,
0
,
0
,
runtime
·
tstart_stdcall
,
m
,
0
,
0
);
if
(
thandle
==
0
)
{
runtime
·
printf
(
"runtime: failed to create new OS thread (have %d already; errno=%d)
\n
"
,
runtime
·
mcount
(),
runtime
·
getlasterror
());
runtime
·
throw
(
"runtime.newosproc"
);
}
}
// Called to initialize a new m (including the bootstrap m).
...
...
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