From ae64a5e26faa054cee65f6f35421d47b03011163 Mon Sep 17 00:00:00 2001 From: Gregory Burd Date: Wed, 1 May 2013 22:02:21 -0400 Subject: [PATCH] Move async nif struct definition back to where it belongs. --- c_src/async_nif.h | 10 ++++++++++ c_src/fifo_q.h | 9 --------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/c_src/async_nif.h b/c_src/async_nif.h index fd8b19d..bc12373 100644 --- a/c_src/async_nif.h +++ b/c_src/async_nif.h @@ -40,6 +40,16 @@ extern "C" { #define ASYNC_NIF_WORKER_QUEUE_SIZE 500 #define ASYNC_NIF_MAX_QUEUED_REQS 1000 * ASYNC_NIF_MAX_WORKERS +STAT_DECL(qwait, 1000); + +struct async_nif_req_entry { + ERL_NIF_TERM ref; + ErlNifEnv *env; + ErlNifPid pid; + void *args; + void (*fn_work)(ErlNifEnv*, ERL_NIF_TERM, ErlNifPid*, unsigned int, void *); + void (*fn_post)(void *); +}; DECL_FIFO_QUEUE(reqs, struct async_nif_req_entry); struct async_nif_work_queue { diff --git a/c_src/fifo_q.h b/c_src/fifo_q.h index b9291f2..f37bf67 100644 --- a/c_src/fifo_q.h +++ b/c_src/fifo_q.h @@ -85,15 +85,6 @@ extern "C" { } \ } while(0); -struct async_nif_req_entry { - ERL_NIF_TERM ref; - ErlNifEnv *env; - ErlNifPid pid; - void *args; - void (*fn_work)(ErlNifEnv*, ERL_NIF_TERM, ErlNifPid*, unsigned int, void *); - void (*fn_post)(void *); -}; - #if defined(__cplusplus) }