From 26f4a40eb42e39931f2746a589ad857f81d65be9 Mon Sep 17 00:00:00 2001 From: ECrownofFire Date: Sat, 27 Oct 2018 18:03:12 -0400 Subject: [PATCH] Mark pwhash functions as CPU bound --- c_src/enacl_nif.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/c_src/enacl_nif.c b/c_src/enacl_nif.c index 4291c0a..0ab1e61 100644 --- a/c_src/enacl_nif.c +++ b/c_src/enacl_nif.c @@ -1781,9 +1781,9 @@ static ErlNifFunc nif_funcs[] = { {"crypto_verify_32", 2, enif_crypto_verify_32}, {"sodium_memzero", 1, enif_sodium_memzero}, - {"crypto_pwhash", 4, enif_crypto_pwhash}, - {"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", 4, enif_crypto_pwhash), + erl_nif_dirty_job_cpu_bound_macro("crypto_pwhash_str", 3, enif_crypto_pwhash_str), + 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_base", 1, enif_crypto_curve25519_scalarmult_base),