summaryrefslogtreecommitdiff
path: root/src/pkg/runtime/netpoll_nacl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/runtime/netpoll_nacl.c')
-rw-r--r--src/pkg/runtime/netpoll_nacl.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/pkg/runtime/netpoll_nacl.c b/src/pkg/runtime/netpoll_nacl.c
new file mode 100644
index 000000000..b75753a23
--- /dev/null
+++ b/src/pkg/runtime/netpoll_nacl.c
@@ -0,0 +1,37 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+#include "runtime.h"
+#include "defs_GOOS_GOARCH.h"
+#include "os_GOOS.h"
+
+// Fake network poller for NaCl.
+// Should never be used, because NaCl network connections do not honor "SetNonblock".
+
+void
+runtime·netpollinit(void)
+{
+}
+
+int32
+runtime·netpollopen(uintptr fd, PollDesc *pd)
+{
+ USED(fd);
+ USED(pd);
+ return 0;
+}
+
+int32
+runtime·netpollclose(uintptr fd)
+{
+ USED(fd);
+ return 0;
+}
+
+G*
+runtime·netpoll(bool block)
+{
+ USED(block);
+ return nil;
+}