mirror of
https://github.com/jeremyd/ergo.git
synced 2026-07-21 23:08:11 -07:00
use new aligned atomic types everywhere
See 69448b13a1 / #1969; the compiler can now ensure that a uint64
intended for atomic access is always aligned to a 64-bit boundary.
Convert atomic operations on uint32s and pointers as well.
This commit is contained in:
+2
-2
@@ -91,7 +91,7 @@ type Server struct {
|
||||
stats Stats
|
||||
semaphores ServerSemaphores
|
||||
flock flock.Flocker
|
||||
defcon uint32
|
||||
defcon atomic.Uint32
|
||||
}
|
||||
|
||||
// NewServer returns a new Oragono server.
|
||||
@@ -103,8 +103,8 @@ func NewServer(config *Config, logger *logger.Manager) (*Server, error) {
|
||||
logger: logger,
|
||||
rehashSignal: make(chan os.Signal, 1),
|
||||
exitSignals: make(chan os.Signal, len(utils.ServerExitSignals)),
|
||||
defcon: 5,
|
||||
}
|
||||
server.defcon.Store(5)
|
||||
|
||||
server.accepts.Initialize()
|
||||
server.clients.Initialize()
|
||||
|
||||
Reference in New Issue
Block a user