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
96890d42
Commit
96890d42
authored
May 15, 2009
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
close TODO
R=r DELTA=42 (0 added, 26 deleted, 16 changed) OCL=28940 CL=28942
parent
8ee8fdea
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
42 deletions
+16
-42
types_amd64_darwin.go
src/lib/syscall/types_amd64_darwin.go
+8
-21
types_amd64_linux.go
src/lib/syscall/types_amd64_linux.go
+8
-21
No files found.
src/lib/syscall/types_amd64_darwin.go
View file @
96890d42
...
@@ -258,11 +258,6 @@ const (
...
@@ -258,11 +258,6 @@ const (
type
WaitStatus
uint32
;
type
WaitStatus
uint32
;
// TODO(rsc): should be method on WaitStatus,
// not *WaitStatus, but causes problems when
// embedding in a *Waitmsg in package os.
// Need to find the 6g bug.
// Wait status is 7 bits at bottom, either 0 (exited),
// Wait status is 7 bits at bottom, either 0 (exited),
// 0x7F (stopped), or a signal number that caused an exit.
// 0x7F (stopped), or a signal number that caused an exit.
// The 0x80 bit is whether there was a core dump.
// The 0x80 bit is whether there was a core dump.
...
@@ -278,26 +273,22 @@ const (
...
@@ -278,26 +273,22 @@ const (
stopped
=
0x7F
;
stopped
=
0x7F
;
)
)
func
(
wp
*
WaitStatus
)
Exited
()
bool
{
func
(
w
WaitStatus
)
Exited
()
bool
{
w
:=
*
wp
;
// TODO(rsc): no pointer
return
w
&
mask
==
exited
;
return
w
&
mask
==
exited
;
}
}
func
(
wp
*
WaitStatus
)
ExitStatus
()
int
{
func
(
w
WaitStatus
)
ExitStatus
()
int
{
w
:=
*
wp
;
// TODO(rsc): no pointer
if
w
&
mask
!=
exited
{
if
w
&
mask
!=
exited
{
return
-
1
;
return
-
1
;
}
}
return
int
(
w
>>
shift
);
return
int
(
w
>>
shift
);
}
}
func
(
wp
*
WaitStatus
)
Signaled
()
bool
{
func
(
w
WaitStatus
)
Signaled
()
bool
{
w
:=
*
wp
;
// TODO(rsc): no pointer
return
w
&
mask
!=
stopped
&&
w
&
mask
!=
0
;
return
w
&
mask
!=
stopped
&&
w
&
mask
!=
0
;
}
}
func
(
wp
*
WaitStatus
)
Signal
()
int
{
func
(
w
WaitStatus
)
Signal
()
int
{
w
:=
*
wp
;
// TODO(rsc): no pointer
sig
:=
int
(
w
&
mask
);
sig
:=
int
(
w
&
mask
);
if
sig
==
stopped
||
sig
==
0
{
if
sig
==
stopped
||
sig
==
0
{
return
-
1
;
return
-
1
;
...
@@ -305,23 +296,19 @@ func (wp *WaitStatus) Signal() int {
...
@@ -305,23 +296,19 @@ func (wp *WaitStatus) Signal() int {
return
sig
;
return
sig
;
}
}
func
(
wp
*
WaitStatus
)
CoreDump
()
bool
{
func
(
w
WaitStatus
)
CoreDump
()
bool
{
w
:=
*
wp
;
// TODO(rsc): no pointer
return
w
.
Signaled
()
&&
w
&
core
!=
0
;
return
w
.
Signaled
()
&&
w
&
core
!=
0
;
}
}
func
(
wp
*
WaitStatus
)
Stopped
()
bool
{
func
(
w
WaitStatus
)
Stopped
()
bool
{
w
:=
*
wp
;
// TODO(rsc): no pointer
return
w
&
mask
==
stopped
&&
w
>>
shift
!=
SIGSTOP
;
return
w
&
mask
==
stopped
&&
w
>>
shift
!=
SIGSTOP
;
}
}
func
(
wp
*
WaitStatus
)
Continued
()
bool
{
func
(
w
WaitStatus
)
Continued
()
bool
{
w
:=
*
wp
;
// TODO(rsc): no pointer
return
w
&
mask
==
stopped
&&
w
>>
shift
==
SIGSTOP
;
return
w
&
mask
==
stopped
&&
w
>>
shift
==
SIGSTOP
;
}
}
func
(
wp
*
WaitStatus
)
StopSignal
()
int
{
func
(
w
WaitStatus
)
StopSignal
()
int
{
w
:=
*
wp
;
// TODO(rsc): no pointer
if
!
w
.
Stopped
()
{
if
!
w
.
Stopped
()
{
return
-
1
;
return
-
1
;
}
}
...
...
src/lib/syscall/types_amd64_linux.go
View file @
96890d42
...
@@ -242,11 +242,6 @@ const (
...
@@ -242,11 +242,6 @@ const (
type
WaitStatus
uint32
;
type
WaitStatus
uint32
;
// TODO(rsc): should be method on WaitStatus,
// not *WaitStatus, but causes problems when
// embedding in a *Waitmsg in package os.
// Need to find the 6g bug.
// Wait status is 7 bits at bottom, either 0 (exited),
// Wait status is 7 bits at bottom, either 0 (exited),
// 0x7F (stopped), or a signal number that caused an exit.
// 0x7F (stopped), or a signal number that caused an exit.
// The 0x80 bit is whether there was a core dump.
// The 0x80 bit is whether there was a core dump.
...
@@ -269,49 +264,41 @@ const (
...
@@ -269,49 +264,41 @@ const (
__unused
=
SIGSTOP
;
__unused
=
SIGSTOP
;
)
)
func
(
wp
*
WaitStatus
)
Exited
()
bool
{
func
(
w
WaitStatus
)
Exited
()
bool
{
w
:=
*
wp
;
// TODO(rsc): no pointer
return
w
&
mask
==
exited
;
return
w
&
mask
==
exited
;
}
}
func
(
wp
*
WaitStatus
)
Signaled
()
bool
{
func
(
w
WaitStatus
)
Signaled
()
bool
{
w
:=
*
wp
;
// TODO(rsc): no pointer
return
w
&
mask
!=
stopped
&&
w
&
mask
!=
exited
;
return
w
&
mask
!=
stopped
&&
w
&
mask
!=
exited
;
}
}
func
(
wp
*
WaitStatus
)
Stopped
()
bool
{
func
(
w
WaitStatus
)
Stopped
()
bool
{
w
:=
*
wp
;
// TODO(rsc): no pointer
return
w
&
0xFF
==
stopped
;
return
w
&
0xFF
==
stopped
;
}
}
func
(
wp
*
WaitStatus
)
Continued
()
bool
{
func
(
w
WaitStatus
)
Continued
()
bool
{
w
:=
*
wp
;
// TODO(rsc): no pointer
return
w
==
0xFFFF
;
return
w
==
0xFFFF
;
}
}
func
(
wp
*
WaitStatus
)
CoreDump
()
bool
{
func
(
w
WaitStatus
)
CoreDump
()
bool
{
w
:=
*
wp
;
// TODO(rsc): no pointer
return
w
.
Signaled
()
&&
w
&
core
!=
0
;
return
w
.
Signaled
()
&&
w
&
core
!=
0
;
}
}
func
(
wp
*
WaitStatus
)
ExitStatus
()
int
{
func
(
w
WaitStatus
)
ExitStatus
()
int
{
w
:=
*
wp
;
// TODO(rsc): no pointer
if
!
w
.
Exited
()
{
if
!
w
.
Exited
()
{
return
-
1
;
return
-
1
;
}
}
return
int
(
w
>>
shift
)
&
0xFF
;
return
int
(
w
>>
shift
)
&
0xFF
;
}
}
func
(
wp
*
WaitStatus
)
Signal
()
int
{
func
(
w
WaitStatus
)
Signal
()
int
{
w
:=
*
wp
;
// TODO(rsc): no pointer
if
!
w
.
Signaled
()
{
if
!
w
.
Signaled
()
{
return
-
1
;
return
-
1
;
}
}
return
int
(
w
&
mask
);
return
int
(
w
&
mask
);
}
}
func
(
wp
*
WaitStatus
)
StopSignal
()
int
{
func
(
w
WaitStatus
)
StopSignal
()
int
{
w
:=
*
wp
;
// TODO(rsc): no pointer
if
!
w
.
Stopped
()
{
if
!
w
.
Stopped
()
{
return
-
1
;
return
-
1
;
}
}
...
...
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