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

Delta Between Two Patch Sets: src/pkg/net/sockopt_unix.go

Issue 6460108: net: epoll dispatcher 2
Left Patch Set: diff -r 1e84edee3397 https://go.googlecode.com/hg/ Created 11 years, 7 months ago
Right Patch Set: diff -r f2755950769b https://dvyukov%40google.com@code.google.com/p/go/ Created 11 years, 4 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « src/pkg/net/sockopt_posix.go ('k') | src/pkg/runtime/defs_linux_amd64.h » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 // Copyright 2012 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 // +build darwin freebsd netbsd openbsd windows
6
7 // Socket options
8
9 package net
10
11 import (
12 "time"
13 )
14
15 func setReadDeadline(fd *netFD, t time.Time) error {
16 if t.IsZero() {
17 fd.rdeadline = 0
18 } else {
19 fd.rdeadline = t.UnixNano()
20 }
21 return nil
22 }
23
24 func setWriteDeadline(fd *netFD, t time.Time) error {
25 if t.IsZero() {
26 fd.wdeadline = 0
27 } else {
28 fd.wdeadline = t.UnixNano()
29 }
30 return nil
31 }
32
33 func setDeadline(fd *netFD, t time.Time) error {
34 if err := setReadDeadline(fd, t); err != nil {
35 return err
36 }
37 return setWriteDeadline(fd, t)
38 }
LEFTRIGHT

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