diff options
author | Sverker Eriksson <[email protected]> | 2014-09-11 17:47:32 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2014-09-12 14:19:04 +0200 |
commit | 12d3d25535225934cb2190c82c1b5dae005f1cda (patch) | |
tree | b292c837c3d0729900daa4a2cbeb7a6000e9f133 /erts/emulator/beam/io.c | |
parent | 84144e03cd902813d1c9f9d75a8b6ecc5e58270d (diff) | |
download | otp-12d3d25535225934cb2190c82c1b5dae005f1cda.tar.gz otp-12d3d25535225934cb2190c82c1b5dae005f1cda.tar.bz2 otp-12d3d25535225934cb2190c82c1b5dae005f1cda.zip |
erts: Remove enif_have_dirty_schedulers()
and add 'dirty_scheduler_support' to ErlNifSysInfo
Diffstat (limited to 'erts/emulator/beam/io.c')
-rw-r--r-- | erts/emulator/beam/io.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/erts/emulator/beam/io.c b/erts/emulator/beam/io.c index ae053fc191..9ae973e108 100644 --- a/erts/emulator/beam/io.c +++ b/erts/emulator/beam/io.c @@ -7274,6 +7274,18 @@ driver_system_info(ErlDrvSysInfo *sip, size_t si_size) sip->nif_major_version = ERL_NIF_MAJOR_VERSION; sip->nif_minor_version = ERL_NIF_MINOR_VERSION; } + /* + * 'dirty_scheduler_support' is the last field in the 4th version + * (driver version 3.1, NIF version 2.7) + */ + if (si_size >= ERL_DRV_SYS_INFO_SIZE(dirty_scheduler_support)) { +#if defined(ERL_NIF_DIRTY_SCHEDULER_SUPPORT) && defined(USE_THREADS) + sip->dirty_scheduler_support = 1; +#else + sip->dirty_scheduler_support = 0; +#endif + } + } |