VirtualBox

Changeset 94102 in vbox


Ignore:
Timestamp:
Mar 6, 2022 9:17:18 PM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
150349
Message:

libs/openssl-3.0.1: More build fixes for the thread support, bugref:10128

Location:
trunk/src/libs/openssl-3.0.1
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/openssl-3.0.1/crypto/threads_iprt.c

    r91772 r94102  
    139139}
    140140
     141int CRYPTO_atomic_or(uint64_t *val, uint64_t op, uint64_t *ret,
     142                     CRYPTO_RWLOCK *lock)
     143{
     144    uint64_t u64RetOld = ASMAtomicUoReadU64(val);
     145    uint64_t u64New;
     146    do
     147        u64New = u64RetOld | op;
     148    while (!ASMAtomicCmpXchgExU64(val, u64New, u64RetOld, &u64RetOld));
     149    *ret = u64RetOld;
     150
     151    return 1;
     152}
     153
     154int CRYPTO_atomic_load(uint64_t *val, uint64_t *ret, CRYPTO_RWLOCK *lock)
     155{
     156    *ret = ASMAtomicReadU64((uint64_t volatile *)val);
     157    return 1;
     158}
     159
    141160#endif
    142161
  • trunk/src/libs/openssl-3.0.1/include/internal/thread_once.h

    r94082 r94102  
    124124 * these errors back (here) and force (in RUN_ONCE()).
    125125 */
    126 #  undef DEFINE_RUN_ONCE              /* currently unused */
    127 #  undef DECLARE_RUN_ONCE             /* currently unused */
     126#  define DEFINE_RUN_ONCE(init)                                       \
     127    static int init(void);                                            \
     128    int init##_ossl_ret_ = 0;                                         \
     129    DECLCALLBACK(int) init##_ossl_(void *pvUser)               \
     130    {                                                                 \
     131        init##_ossl_ret_ = init();                                    \
     132        return init##_ossl_ret_ ? VINF_SUCCESS : VERR_INTERNAL_ERROR; \
     133    }                                                                 \
     134    static int init(void)
     135
     136#  define DECLARE_RUN_ONCE(init)                \
     137    extern int init##_ossl_ret_;                \
     138    extern DECLCALLBACK(int) init##_ossl_(void *pvUser);
     139
    128140#  undef DEFINE_RUN_ONCE_STATIC_ALT  /* currently unused */
    129141
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette