LEFT | RIGHT |
(no file at all) | |
1 // Copyright 2013 The Go Authors. All rights reserved. | 1 // Copyright 2013 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 // +build darwin | 5 // +build darwin linux,386 linux,amd64 |
6 | 6 |
7 package net | 7 package net |
8 | 8 |
9 #include "runtime.h" | 9 #include "runtime.h" |
10 #include "defs_GOOS_GOARCH.h" | 10 #include "defs_GOOS_GOARCH.h" |
11 #include "arch_GOARCH.h" | 11 #include "arch_GOARCH.h" |
12 #include "malloc.h" | 12 #include "malloc.h" |
13 | 13 |
14 // Integrated network poller (platform-independent part). | 14 // Integrated network poller (platform-independent part). |
15 // A particular implementation (epoll/kqueue) must define the following function
s: | 15 // A particular implementation (epoll/kqueue) must define the following function
s: |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 for(i = 0; i < n; i++) { | 339 for(i = 0; i < n; i++) { |
340 pd[i].link = pollcache.first; | 340 pd[i].link = pollcache.first; |
341 pollcache.first = &pd[i]; | 341 pollcache.first = &pd[i]; |
342 } | 342 } |
343 } | 343 } |
344 pd = pollcache.first; | 344 pd = pollcache.first; |
345 pollcache.first = pd->link; | 345 pollcache.first = pd->link; |
346 runtimeĀ·unlock(&pollcache); | 346 runtimeĀ·unlock(&pollcache); |
347 return pd; | 347 return pd; |
348 } | 348 } |
LEFT | RIGHT |