LEFT | RIGHT |
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 linux linux,386 linux,amd64 | 5 // +build linux,386 linux,amd64 |
6 | 6 |
7 #include "runtime.h" | 7 #include "runtime.h" |
8 #include "defs_GOOS_GOARCH.h" | 8 #include "defs_GOOS_GOARCH.h" |
9 | 9 |
10 int32 runtime·epollcreate(int32 size); | 10 int32 runtime·epollcreate(int32 size); |
11 int32 runtime·epollcreate1(int32 flags); | 11 int32 runtime·epollcreate1(int32 flags); |
12 int32 runtime·epollctl(int32 epfd, int32 op, int32 fd, EpollEvent *ev); | 12 int32 runtime·epollctl(int32 epfd, int32 op, int32 fd, EpollEvent *ev); |
13 int32 runtime·epollwait(int32 epfd, EpollEvent *ev, int32 nev, int32 timeout); | 13 int32 runtime·epollwait(int32 epfd, EpollEvent *ev, int32 nev, int32 timeout); |
14 void runtime·closeonexec(int32 fd); | 14 void runtime·closeonexec(int32 fd); |
15 | 15 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 mode += 'r'; | 71 mode += 'r'; |
72 if(ev->events & (EPOLLOUT|EPOLLHUP|EPOLLERR)) | 72 if(ev->events & (EPOLLOUT|EPOLLHUP|EPOLLERR)) |
73 mode += 'w'; | 73 mode += 'w'; |
74 if(mode) | 74 if(mode) |
75 runtime·netpollready(&gp, (void*)ev->data, mode); | 75 runtime·netpollready(&gp, (void*)ev->data, mode); |
76 } | 76 } |
77 if(block && gp == nil) | 77 if(block && gp == nil) |
78 goto retry; | 78 goto retry; |
79 return gp; | 79 return gp; |
80 } | 80 } |
LEFT | RIGHT |