diff options
Diffstat (limited to 'crypto/dso')
-rw-r--r-- | crypto/dso/dso_lib.c | 4 | ||||
-rw-r--r-- | crypto/dso/dso_locl.h | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/crypto/dso/dso_lib.c b/crypto/dso/dso_lib.c index 52816dfb9d..8f185b3828 100644 --- a/crypto/dso/dso_lib.c +++ b/crypto/dso/dso_lib.c @@ -65,7 +65,7 @@ int DSO_free(DSO *dso) if (dso == NULL) return (1); - if (CRYPTO_atomic_add(&dso->references, -1, &i, dso->lock) <= 0) + if (CRYPTO_DOWN_REF(&dso->references, &i, dso->lock) <= 0) return 0; REF_PRINT_COUNT("DSO", dso); @@ -107,7 +107,7 @@ int DSO_up_ref(DSO *dso) return 0; } - if (CRYPTO_atomic_add(&dso->references, 1, &i, dso->lock) <= 0) + if (CRYPTO_UP_REF(&dso->references, &i, dso->lock) <= 0) return 0; REF_PRINT_COUNT("DSO", r); diff --git a/crypto/dso/dso_locl.h b/crypto/dso/dso_locl.h index fbfad0544a..14a0ccb7c0 100644 --- a/crypto/dso/dso_locl.h +++ b/crypto/dso/dso_locl.h @@ -11,6 +11,7 @@ #include "internal/cryptlib.h" #include "internal/dso.h" #include "internal/dso_conf.h" +#include "internal/refcount.h" /**********************************************************************/ /* The low-level handle type used to refer to a loaded shared library */ @@ -24,7 +25,7 @@ struct dso_st { * "Handles" and such go in a STACK. */ STACK_OF(void) *meth_data; - int references; + CRYPTO_REF_COUNT references; int flags; /* * For use by applications etc ... use this for your bits'n'pieces, don't |