diff options
author | Rickard Green <[email protected]> | 2011-05-10 21:12:05 +0200 |
---|---|---|
committer | Rickard Green <[email protected]> | 2011-05-13 14:23:28 +0200 |
commit | 78ebe8aa3754fc8837ab3a6b0bc11d1e78275eef (patch) | |
tree | a2d4e660b73dfee4fbf25f091a9fc6b8787b62bc /erts/emulator/beam/io.c | |
parent | 3da283a85f73132e73ab911154c2c0ff8797d61d (diff) | |
download | otp-78ebe8aa3754fc8837ab3a6b0bc11d1e78275eef.tar.gz otp-78ebe8aa3754fc8837ab3a6b0bc11d1e78275eef.tar.bz2 otp-78ebe8aa3754fc8837ab3a6b0bc11d1e78275eef.zip |
Use 32-bit atomic for port snapshot
Diffstat (limited to 'erts/emulator/beam/io.c')
-rw-r--r-- | erts/emulator/beam/io.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/erts/emulator/beam/io.c b/erts/emulator/beam/io.c index 86f550310c..8c1126aa6e 100644 --- a/erts/emulator/beam/io.c +++ b/erts/emulator/beam/io.c @@ -189,7 +189,7 @@ typedef struct line_buf_context { static erts_smp_spinlock_t get_free_port_lck; static Uint last_port_num; static Uint port_num_mask; -erts_smp_atomic_t erts_ports_snapshot; /* Identifies the _next_ snapshot (not the ongoing) */ +erts_smp_atomic32_t erts_ports_snapshot; /* Identifies the _next_ snapshot (not the ongoing) */ static ERTS_INLINE void @@ -422,7 +422,7 @@ setup_port(Port* prt, Eterm pid, erts_driver_t *driver, erts_smp_runq_lock(runq); erts_smp_port_state_lock(prt); prt->status = ERTS_PORT_SFLG_CONNECTED | xstatus; - prt->snapshot = (Uint32) erts_smp_atomic_read(&erts_ports_snapshot); + prt->snapshot = erts_smp_atomic32_read(&erts_ports_snapshot); old_name = prt->name; prt->name = new_name; #ifdef ERTS_SMP @@ -1293,7 +1293,7 @@ void init_io(void) erts_port[i].port_data_lock = NULL; } - erts_smp_atomic_init(&erts_ports_snapshot, (erts_aint_t) 0); + erts_smp_atomic32_init(&erts_ports_snapshot, (erts_aint32_t) 0); last_port_num = 0; erts_smp_spinlock_init(&get_free_port_lck, "get_free_port"); |