diff options
author | Rickard Green <[email protected]> | 2017-10-24 14:24:45 +0200 |
---|---|---|
committer | Rickard Green <[email protected]> | 2018-03-05 11:54:59 +0100 |
commit | fbb10ebc4a37555c7ea7f99e14286d862993976a (patch) | |
tree | 671552a46c0d47593cda8583c1af7f2b405b0dea /erts/emulator/beam/io.c | |
parent | 12e6a19037afe9bcab53b1429b68e35c4eb7bafb (diff) | |
download | otp-fbb10ebc4a37555c7ea7f99e14286d862993976a.tar.gz otp-fbb10ebc4a37555c7ea7f99e14286d862993976a.tar.bz2 otp-fbb10ebc4a37555c7ea7f99e14286d862993976a.zip |
Replace usage of ERTS_PSFLG_BOUND
Diffstat (limited to 'erts/emulator/beam/io.c')
-rw-r--r-- | erts/emulator/beam/io.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/erts/emulator/beam/io.c b/erts/emulator/beam/io.c index 4bb2c0cb01..3e8f6263bb 100644 --- a/erts/emulator/beam/io.c +++ b/erts/emulator/beam/io.c @@ -298,7 +298,6 @@ static Port *create_port(char *name, erts_aint32_t state = ERTS_PORT_SFLG_CONNECTED; erts_aint32_t x_pts_flgs = 0; - ErtsRunQueue *runq; if (!driver_lock) { /* Align size for mutex following port struct */ port_size = size = ERTS_ALC_DATA_ALIGN_SIZE(sizeof(Port)); @@ -347,11 +346,16 @@ static Port *create_port(char *name, p += sizeof(erts_mtx_t); state |= ERTS_PORT_SFLG_PORT_SPECIFIC_LOCK; } - if (erts_get_scheduler_data()) - runq = erts_get_runq_current(NULL); - else - runq = ERTS_RUNQ_IX(0); - erts_atomic_set_nob(&prt->run_queue, (erts_aint_t) runq); + + { + ErtsRunQueue *runq; + ErtsSchedulerData *esdp = erts_get_scheduler_data(); + if (esdp) + runq = erts_get_runq_current(esdp); + else + runq = ERTS_RUNQ_IX(0); + erts_init_runq_port(prt, runq); + } prt->xports = NULL; |