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
c5e7e196
Commit
c5e7e196
authored
Oct 29, 2008
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update linux for int/int32
R=r DELTA=7 (0 added, 0 deleted, 7 changed) OCL=18050 CL=18069
parent
527669e6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
fd_linux.go
src/lib/net/fd_linux.go
+3
-3
file_linux.go
src/lib/syscall/file_linux.go
+1
-1
socket_linux.go
src/lib/syscall/socket_linux.go
+3
-3
No files found.
src/lib/net/fd_linux.go
View file @
c5e7e196
...
...
@@ -21,7 +21,7 @@ export type Pollster struct {
epfd
int64
;
// Events we're already waiting for
events
*
map
[
int64
]
uint
;
events
*
map
[
int64
]
uint
32
;
}
export
func
NewPollster
()
(
p
*
Pollster
,
err
*
os
.
Error
)
{
...
...
@@ -34,7 +34,7 @@ export func NewPollster() (p *Pollster, err *os.Error) {
if
p
.
epfd
,
e
=
syscall
.
epoll_create
(
16
);
e
!=
0
{
return
nil
,
os
.
ErrnoToError
(
e
)
}
p
.
events
=
new
(
map
[
int64
]
uint
);
p
.
events
=
new
(
map
[
int64
]
uint
32
);
return
p
,
nil
}
...
...
@@ -81,7 +81,7 @@ func (p *Pollster) StopWaiting(fd int64, bits uint) {
// Disable the given bits.
// If we're still waiting for other events, modify the fd
// event in the kernel. Otherwise, delete it.
events
&=
^
bits
;
events
&=
^
uint32
(
bits
)
;
if
int32
(
events
)
&
^
syscall
.
EPOLLONESHOT
!=
0
{
var
ev
syscall
.
EpollEvent
;
ev
.
fd
=
int32
(
fd
);
...
...
src/lib/syscall/file_linux.go
View file @
c5e7e196
...
...
@@ -44,7 +44,7 @@ export func write(fd int64, buf *byte, nbytes int64) (ret int64, errno int64) {
}
export
func
pipe
(
fds
*
[
2
]
int64
)
(
ret
int64
,
errno
int64
)
{
var
t
[
2
]
int
;
var
t
[
2
]
int
32
;
r1
,
r2
,
err
:=
Syscall
(
SYS_PIPE
,
Int32Ptr
(
&
t
[
0
]),
0
,
0
);
if
r1
<
0
{
return
r1
,
err
;
...
...
src/lib/syscall/socket_linux.go
View file @
c5e7e196
...
...
@@ -47,7 +47,7 @@ export func listen(fd, n int64) (ret int64, err int64) {
}
export
func
accept
(
fd
int64
,
sa
*
Sockaddr
)
(
ret
int64
,
err
int64
)
{
n
:
=
SizeofSockaddr
;
var
n
int32
=
SizeofSockaddr
;
r1
,
r2
,
e
:=
Syscall
(
SYS_ACCEPT
,
fd
,
SockaddrPtr
(
sa
),
Int32Ptr
(
&
n
));
return
r1
,
e
}
...
...
@@ -61,7 +61,7 @@ export func setsockopt(fd, level, opt, valueptr, length int64) (ret int64, err i
}
export
func
setsockopt_int
(
fd
,
level
,
opt
int64
,
value
int
)
int64
{
n
:=
int
(
opt
);
n
:=
int
32
(
opt
);
r1
,
e
:=
setsockopt
(
fd
,
level
,
opt
,
Int32Ptr
(
&
n
),
4
);
return
e
}
...
...
@@ -79,7 +79,7 @@ export func setsockopt_linger(fd, level, opt int64, sec int) int64 {
var
l
Linger
;
if
sec
!=
0
{
l
.
yes
=
1
;
l
.
sec
=
sec
l
.
sec
=
int32
(
sec
)
}
else
{
l
.
yes
=
0
;
l
.
sec
=
0
...
...
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