static void dummy_pause_job(void) {
    ASYNC_JOB *job;
    ASYNC_WAIT_CTX *waitctx;
    OSSL_ASYNC_FD pipefds[2] = {0, 0};
    OSSL_ASYNC_FD *writefd;
#if defined(ASYNC_WIN)
    DWORD numwritten, numread;
    char buf = DUMMY_CHAR;
#elif defined(ASYNC_POSIX)
    char buf = DUMMY_CHAR;
#endif
    if ((job = ASYNC_get_current_job()) == NULL)
        return;
    waitctx = ASYNC_get_wait_ctx(job);
    if (ASYNC_WAIT_CTX_get_fd(waitctx, engine_dasync_id, &pipefds[0],
                              (void **)&writefd)) {
        pipefds[1] = *writefd;
    } else {
        writefd = OPENSSL_malloc(sizeof(*writefd));
        if (writefd == NULL)
            return;
#if defined(ASYNC_WIN)
        if (CreatePipe(&pipefds[0], &pipefds[1], NULL, 256) == 0) {
            OPENSSL_free(writefd);
            return;
        }
#elif defined(ASYNC_POSIX)
        if (pipe(pipefds) != 0) {
            OPENSSL_free(writefd);
            return;
        }
#endif
        *writefd = pipefds[1];
        if(!ASYNC_WAIT_CTX_set_wait_fd(waitctx, engine_dasync_id, pipefds[0],
                                       writefd, wait_cleanup)) {
            wait_cleanup(waitctx, engine_dasync_id, pipefds[0], writefd);
            return;
        }
    }
#if defined(ASYNC_WIN)
    WriteFile(pipefds[1], &buf, 1, &numwritten, NULL);
#elif defined(ASYNC_POSIX)
    if (write(pipefds[1], &buf, 1) < 0)
        return;
#endif
    ASYNC_pause_job();
#if defined(ASYNC_WIN)
    ReadFile(pipefds[0], &buf, 1, &numread, NULL);
#elif defined(ASYNC_POSIX)
    if (read(pipefds[0], &buf, 1) < 0)
        return;
#endif
}
['static void dummy_pause_job(void) {\n    ASYNC_JOB *job;\n    ASYNC_WAIT_CTX *waitctx;\n    OSSL_ASYNC_FD pipefds[2] = {0, 0};\n    OSSL_ASYNC_FD *writefd;\n#if defined(ASYNC_WIN)\n    DWORD numwritten, numread;\n    char buf = DUMMY_CHAR;\n#elif defined(ASYNC_POSIX)\n    char buf = DUMMY_CHAR;\n#endif\n    if ((job = ASYNC_get_current_job()) == NULL)\n        return;\n    waitctx = ASYNC_get_wait_ctx(job);\n    if (ASYNC_WAIT_CTX_get_fd(waitctx, engine_dasync_id, &pipefds[0],\n                              (void **)&writefd)) {\n        pipefds[1] = *writefd;\n    } else {\n        writefd = OPENSSL_malloc(sizeof(*writefd));\n        if (writefd == NULL)\n            return;\n#if defined(ASYNC_WIN)\n        if (CreatePipe(&pipefds[0], &pipefds[1], NULL, 256) == 0) {\n            OPENSSL_free(writefd);\n            return;\n        }\n#elif defined(ASYNC_POSIX)\n        if (pipe(pipefds) != 0) {\n            OPENSSL_free(writefd);\n            return;\n        }\n#endif\n        *writefd = pipefds[1];\n        if(!ASYNC_WAIT_CTX_set_wait_fd(waitctx, engine_dasync_id, pipefds[0],\n                                       writefd, wait_cleanup)) {\n            wait_cleanup(waitctx, engine_dasync_id, pipefds[0], writefd);\n            return;\n        }\n    }\n#if defined(ASYNC_WIN)\n    WriteFile(pipefds[1], &buf, 1, &numwritten, NULL);\n#elif defined(ASYNC_POSIX)\n    if (write(pipefds[1], &buf, 1) < 0)\n        return;\n#endif\n    ASYNC_pause_job();\n#if defined(ASYNC_WIN)\n    ReadFile(pipefds[0], &buf, 1, &numread, NULL);\n#elif defined(ASYNC_POSIX)\n    if (read(pipefds[0], &buf, 1) < 0)\n        return;\n#endif\n}', 'ASYNC_JOB *ASYNC_get_current_job(void)\n{\n    async_ctx *ctx;\n    ctx = async_get_ctx();\n    if(ctx == NULL)\n        return NULL;\n    return ctx->currjob;\n}', 'async_ctx *async_get_ctx(void)\n{\n    if (!OPENSSL_init_crypto(OPENSSL_INIT_ASYNC, NULL))\n        return NULL;\n    return (async_ctx *)CRYPTO_THREAD_get_local(&ctxkey);\n}', 'void *CRYPTO_THREAD_get_local(CRYPTO_THREAD_LOCAL *key)\n{\n    return pthread_getspecific(*key);\n}', 'ASYNC_WAIT_CTX *ASYNC_get_wait_ctx(ASYNC_JOB *job)\n{\n    return job->waitctx;\n}', 'int ASYNC_WAIT_CTX_get_fd(ASYNC_WAIT_CTX *ctx, const void *key,\n                          OSSL_ASYNC_FD *fd, void **custom_data)\n{\n    struct fd_lookup_st *curr;\n    curr = ctx->fds;\n    while (curr != NULL) {\n        if (curr->del) {\n            curr = curr->next;\n            continue;\n        }\n        if (curr->key == key) {\n            *fd = curr->fd;\n            *custom_data = curr->custom_data;\n            return 1;\n        }\n        curr = curr->next;\n    }\n    return 0;\n}', 'void *CRYPTO_malloc(size_t num, const char *file, int line)\n{\n    void *ret = NULL;\n    if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)\n        return malloc_impl(num, file, line);\n    if (num <= 0)\n        return NULL;\n    allow_customize = 0;\n#ifndef OPENSSL_NO_CRYPTO_MDEBUG\n    if (call_malloc_debug) {\n        CRYPTO_mem_debug_malloc(NULL, num, 0, file, line);\n        ret = malloc(num);\n        CRYPTO_mem_debug_malloc(ret, num, 1, file, line);\n    } else {\n        ret = malloc(num);\n    }\n#else\n    osslargused(file); osslargused(line);\n    ret = malloc(num);\n#endif\n    return ret;\n}']