int RAND_poll(void)
{
    int ret = 0;
    RAND_POOL *pool = NULL;
    const RAND_METHOD *meth = RAND_get_rand_method();
    if (meth == RAND_OpenSSL()) {
        RAND_DRBG *drbg = RAND_DRBG_get0_master();
        if (drbg == NULL)
            return 0;
        rand_drbg_lock(drbg);
        ret = rand_drbg_restart(drbg, NULL, 0, 0);
        rand_drbg_unlock(drbg);
        return ret;
    } else {
        pool = rand_pool_new(RAND_DRBG_STRENGTH,
                             (RAND_DRBG_STRENGTH + 7) / 8,
                             RAND_POOL_MAX_LENGTH);
        if (pool == NULL)
            return 0;
        if (rand_pool_acquire_entropy(pool) == 0)
            goto err;
        if (meth->add == NULL
            || meth->add(rand_pool_buffer(pool),
                         rand_pool_length(pool),
                         (rand_pool_entropy(pool) / 8.0)) == 0)
            goto err;
        ret = 1;
    }
err:
    rand_pool_free(pool);
    return ret;
}
['int RAND_poll(void)\n{\n    int ret = 0;\n    RAND_POOL *pool = NULL;\n    const RAND_METHOD *meth = RAND_get_rand_method();\n    if (meth == RAND_OpenSSL()) {\n        RAND_DRBG *drbg = RAND_DRBG_get0_master();\n        if (drbg == NULL)\n            return 0;\n        rand_drbg_lock(drbg);\n        ret = rand_drbg_restart(drbg, NULL, 0, 0);\n        rand_drbg_unlock(drbg);\n        return ret;\n    } else {\n        pool = rand_pool_new(RAND_DRBG_STRENGTH,\n                             (RAND_DRBG_STRENGTH + 7) / 8,\n                             RAND_POOL_MAX_LENGTH);\n        if (pool == NULL)\n            return 0;\n        if (rand_pool_acquire_entropy(pool) == 0)\n            goto err;\n        if (meth->add == NULL\n            || meth->add(rand_pool_buffer(pool),\n                         rand_pool_length(pool),\n                         (rand_pool_entropy(pool) / 8.0)) == 0)\n            goto err;\n        ret = 1;\n    }\nerr:\n    rand_pool_free(pool);\n    return ret;\n}', 'const RAND_METHOD *RAND_get_rand_method(void)\n{\n    const RAND_METHOD *tmp_meth = NULL;\n    if (!RUN_ONCE(&rand_init, do_rand_init))\n        return NULL;\n    CRYPTO_THREAD_write_lock(rand_meth_lock);\n    if (default_RAND_meth == NULL) {\n#ifndef OPENSSL_NO_ENGINE\n        ENGINE *e;\n        if ((e = ENGINE_get_default_RAND()) != NULL\n                && (tmp_meth = ENGINE_get_RAND(e)) != NULL) {\n            funct_ref = e;\n            default_RAND_meth = tmp_meth;\n        } else {\n            ENGINE_finish(e);\n            default_RAND_meth = &rand_meth;\n        }\n#else\n        default_RAND_meth = &rand_meth;\n#endif\n    }\n    tmp_meth = default_RAND_meth;\n    CRYPTO_THREAD_unlock(rand_meth_lock);\n    return tmp_meth;\n}', 'int CRYPTO_THREAD_run_once(CRYPTO_ONCE *once, void (*init)(void))\n{\n    if (pthread_once(once, init) != 0)\n        return 0;\n    return 1;\n}', 'RAND_METHOD *RAND_OpenSSL(void)\n{\n    return &rand_meth;\n}']