diff options
Diffstat (limited to 'sha256_sse2_amd64.c')
-rw-r--r-- | sha256_sse2_amd64.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sha256_sse2_amd64.c b/sha256_sse2_amd64.c index 03a8323..d97d888 100644 --- a/sha256_sse2_amd64.c +++ b/sha256_sse2_amd64.c @@ -47,7 +47,8 @@ uint32_t g_sha256_hinit[8] = __m128i g_4sha256_k[64]; -int scanhash_sse2_64(const unsigned char *pmidstate, unsigned char *pdata, +int scanhash_sse2_64(int thr_id, const unsigned char *pmidstate, + unsigned char *pdata, unsigned char *phash1, unsigned char *phash, const unsigned char *ptarget, uint32_t max_nonce, unsigned long *nHashesDone) @@ -59,6 +60,8 @@ int scanhash_sse2_64(const unsigned char *pmidstate, unsigned char *pdata, __m128i offset; int i; + work_restart[thr_id].restart = 0; + /* For debugging */ union { __m128i m; @@ -116,7 +119,7 @@ int scanhash_sse2_64(const unsigned char *pmidstate, unsigned char *pdata, nonce += 4; - if (nonce >= max_nonce) + if ((nonce >= max_nonce) || work_restart[thr_id].restart) { *nHashesDone = nonce; return -1; |