diff options
author | Jeff Garzik <jeff@garzik.org> | 2011-03-14 23:17:34 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2011-03-14 23:17:34 -0400 |
commit | 4f7a51e9ed4accbd1be6fad38a9bbc70531cb37f (patch) | |
tree | d95aa0dfdb56f6f266537c2f76b7abc6914196b8 /miner.h | |
parent | cdb4cd9c8be6c828908622efdca732eff8495787 (diff) |
Move all RPC I/O to separate thread.
Diffstat (limited to 'miner.h')
-rw-r--r-- | miner.h | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -70,7 +70,7 @@ extern bool opt_protocol; extern const uint32_t sha256_init_state[]; extern json_t *json_rpc_call(CURL *curl, const char *url, const char *userpass, const char *rpc_req); -extern char *bin2hex(unsigned char *p, size_t len); +extern char *bin2hex(const unsigned char *p, size_t len); extern bool hex2bin(unsigned char *p, const char *hexstr, size_t len); extern unsigned int ScanHash_4WaySSE2(const unsigned char *pmidstate, @@ -109,4 +109,13 @@ timeval_subtract (struct timeval *result, struct timeval *x, struct timeval *y); extern bool fulltest(const unsigned char *hash, const unsigned char *target); +struct thread_q; + +extern struct thread_q *tq_new(void); +extern void tq_free(struct thread_q *tq); +extern bool tq_push(struct thread_q *tq, void *data); +extern void *tq_pop(struct thread_q *tq, const struct timespec *abstime); +extern void tq_freeze(struct thread_q *tq); +extern void tq_thaw(struct thread_q *tq); + #endif /* __MINER_H__ */ |