Mark pwhash functions as CPU bound

This commit is contained in:
ECrownofFire 2018-10-27 18:03:12 -04:00
parent 07bcd87294
commit 26f4a40eb4
No known key found for this signature in database
GPG Key ID: B5C602DAACC7BCF9

View File

@ -1781,9 +1781,9 @@ static ErlNifFunc nif_funcs[] = {
{"crypto_verify_32", 2, enif_crypto_verify_32}, {"crypto_verify_32", 2, enif_crypto_verify_32},
{"sodium_memzero", 1, enif_sodium_memzero}, {"sodium_memzero", 1, enif_sodium_memzero},
{"crypto_pwhash", 4, enif_crypto_pwhash}, erl_nif_dirty_job_cpu_bound_macro("crypto_pwhash", 4, enif_crypto_pwhash),
{"crypto_pwhash_str", 3, enif_crypto_pwhash_str}, erl_nif_dirty_job_cpu_bound_macro("crypto_pwhash_str", 3, enif_crypto_pwhash_str),
{"crypto_pwhash_str_verify", 2, enif_crypto_pwhash_str_verify}, erl_nif_dirty_job_cpu_bound_macro("crypto_pwhash_str_verify", 2, enif_crypto_pwhash_str_verify),
erl_nif_dirty_job_cpu_bound_macro("crypto_curve25519_scalarmult", 2, enif_crypto_curve25519_scalarmult), erl_nif_dirty_job_cpu_bound_macro("crypto_curve25519_scalarmult", 2, enif_crypto_curve25519_scalarmult),
erl_nif_dirty_job_cpu_bound_macro("crypto_curve25519_scalarmult_base", 1, enif_crypto_curve25519_scalarmult_base), erl_nif_dirty_job_cpu_bound_macro("crypto_curve25519_scalarmult_base", 1, enif_crypto_curve25519_scalarmult_base),