Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2981)

Issue 12663043: code review 12663043: net: separate unix pollster initialization from network... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 8 months ago by mikio
Modified:
10 years, 8 months ago
Reviewers:
dvyukov
CC:
dvyukov, bradfitz, golang-dev
Visibility:
Public.

Description

net: separate unix pollster initialization from network file descriptor allocation Unlike the existing net package own pollster, runtime-integrated network pollster on BSD variants, actually kqueue, requires a socket that has beed passed to syscall.Listen previously for a stream listener. This CL separates pollDesc.Init of Unix network pollster from newFD to avoid any breakages in the transition from Unix network pollster to runtime-integrated pollster. Upcoming CLs will rearrange the call order of pollster and syscall functions like the following; - For dialers that open active connections, pollDesc.Init will be called in between syscall.Bind and syscall.Connect. - For stream listeners that open passive stream connections, pollDesc.Init will be called just after syscall.Listen. - For datagram listeners that open datagram connections, pollDesc.Init will be called just after syscall.Bind. This is in preparation for runtime-integrated network pollster for BSD variants. Update issue 5199

Patch Set 1 #

Patch Set 2 : diff -r 2a74ed09bf00 https://code.google.com/p/go #

Patch Set 3 : diff -r 4a2be1c8942f https://go.googlecode.com/hg/ #

Patch Set 4 : diff -r e70b5c8567b0 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -0 lines) Patch
M src/pkg/net/fd_poll_unix.go View 1 2 chunks +12 lines, -0 lines 0 comments Download

Messages

Total messages: 7
mikio
Hello dvyukov@google.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
10 years, 8 months ago (2013-08-08 20:49:24 UTC) #1
bradfitz
Who is calling these methods when they don't have pollServers? On Thu, Aug 8, 2013 ...
10 years, 8 months ago (2013-08-08 21:27:48 UTC) #2
dvyukov
When you switch to runtime netpoll, you will delete fd_poll_unix.go. So why do we need ...
10 years, 8 months ago (2013-08-08 21:41:50 UTC) #3
mikio
On Fri, Aug 9, 2013 at 6:41 AM, <dvyukov@google.com> wrote: > When you switch to ...
10 years, 8 months ago (2013-08-08 22:01:08 UTC) #4
mikio
On Fri, Aug 9, 2013 at 6:27 AM, Brad Fitzpatrick <bradfitz@golang.org> wrote: > Who is ...
10 years, 8 months ago (2013-08-08 22:09:23 UTC) #5
dvyukov
LGTM I think I understand what happens
10 years, 8 months ago (2013-08-08 22:28:43 UTC) #6
mikio
10 years, 8 months ago (2013-08-09 00:03:00 UTC) #7
*** Submitted as https://code.google.com/p/go/source/detail?r=333a1fab08e7 ***

net: separate unix pollster initialization from network file descriptor
allocation

Unlike the existing net package own pollster, runtime-integrated
network pollster on BSD variants, actually kqueue, requires a socket
that has beed passed to syscall.Listen previously for a stream
listener.

This CL separates pollDesc.Init of Unix network pollster from newFD
to avoid any breakages in the transition from Unix network pollster
to runtime-integrated pollster. Upcoming CLs will rearrange the call
order of pollster and syscall functions like the following;

- For dialers that open active connections, pollDesc.Init will be
  called in between syscall.Bind and syscall.Connect.

- For stream listeners that open passive stream connections,
  pollDesc.Init will be called just after syscall.Listen.

- For datagram listeners that open datagram connections,
  pollDesc.Init will be called just after syscall.Bind.

This is in preparation for runtime-integrated network pollster for BSD
variants.

Update issue 5199

R=dvyukov, bradfitz
CC=golang-dev
https://codereview.appspot.com/12663043
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b