summaryrefslogtreecommitdiffhomepage
path: root/src/nginext/port.go
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2017-08-29 14:18:00 -0700
committerMax Romanov <max.romanov@nginx.com>2017-08-29 14:18:00 -0700
commit92f3b852981c739a2e6ff6d50dc646fe86031b27 (patch)
tree4d6277f1e9e6a39a7250a181acb4697ee4b034bd /src/nginext/port.go
parent6de7cc86344fff319d47f4e3656b7df2bef3283a (diff)
downloadunit-92f3b852981c739a2e6ff6d50dc646fe86031b27.tar.gz
unit-92f3b852981c739a2e6ff6d50dc646fe86031b27.tar.bz2
The process type enum exposed to go module.
Diffstat (limited to '')
-rw-r--r--src/nginext/port.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nginext/port.go b/src/nginext/port.go
index 26ca26d2..ee858612 100644
--- a/src/nginext/port.go
+++ b/src/nginext/port.go
@@ -7,6 +7,7 @@ package nginext
/*
#include "nxt_go_lib.h"
+#include "nxt_process_type.h"
*/
import "C"
@@ -33,7 +34,7 @@ type port struct {
type port_registry struct {
sync.RWMutex
m map[port_key]*port
- t [5]*port
+ t [C.NXT_PROCESS_MAX]*port
}
var port_registry_ port_registry
@@ -65,7 +66,7 @@ func remove_by_pid(pid int) {
func main_port() *port {
port_registry_.RLock()
- res := port_registry_.t[1]
+ res := port_registry_.t[C.NXT_PROCESS_MAIN]
port_registry_.RUnlock()
return res