mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 02:00:11 -08: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:
parent
507dc2d838
commit
35128bfc23
6 changed files with 25 additions and 27 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue