work_restart should only be changed by cgminer.c now
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116
diff --git a/driver-icarus.c b/driver-icarus.c
index 78e9129..12b70e6 100644
--- a/driver-icarus.c
+++ b/driver-icarus.c
@@ -277,7 +277,6 @@ static uint64_t icarus_scanhash(struct thr_info *thr, struct work *work,
__maybe_unused uint64_t max_nonce)
{
volatile unsigned long *wr = &work_restart[thr->id].restart;
- *wr = 0;
struct cgpu_info *icarus;
int fd;
diff --git a/sha256_4way.c b/sha256_4way.c
index 27293d2..35116a6 100644
--- a/sha256_4way.c
+++ b/sha256_4way.c
@@ -111,8 +111,6 @@ bool ScanHash_4WaySSE2(int thr_id, const unsigned char *pmidstate,
pdata += 64;
- work_restart[thr_id].restart = 0;
-
for (;;)
{
unsigned int thash[9][NPAR] __attribute__((aligned(128)));
diff --git a/sha256_altivec_4way.c b/sha256_altivec_4way.c
index 43a96b2..cb3351c 100644
--- a/sha256_altivec_4way.c
+++ b/sha256_altivec_4way.c
@@ -84,8 +84,6 @@ bool ScanHash_altivec_4way(int thr_id, const unsigned char *pmidstate,
pdata += 64;
- work_restart[thr_id].restart = 0;
-
for (;;)
{
unsigned int thash[9][NPAR] __attribute__((aligned(128)));
diff --git a/sha256_cryptopp.c b/sha256_cryptopp.c
index 11c1c5c..aab8bba 100644
--- a/sha256_cryptopp.c
+++ b/sha256_cryptopp.c
@@ -589,8 +589,6 @@ bool scanhash_asm32(int thr_id, const unsigned char *midstate,
data += 64;
- work_restart[thr_id].restart = 0;
-
while (1) {
n++;
*nonce = n;
diff --git a/sha256_generic.c b/sha256_generic.c
index 05f4c37..95591fe 100644
--- a/sha256_generic.c
+++ b/sha256_generic.c
@@ -251,8 +251,6 @@ bool scanhash_c(int thr_id, const unsigned char *midstate, unsigned char *data,
data += 64;
- work_restart[thr_id].restart = 0;
-
while (1) {
n++;
*nonce = n;
diff --git a/sha256_sse2_amd64.c b/sha256_sse2_amd64.c
index ad1f45d..a109e8a 100644
--- a/sha256_sse2_amd64.c
+++ b/sha256_sse2_amd64.c
@@ -65,8 +65,6 @@ bool scanhash_sse2_64(int thr_id, const unsigned char *pmidstate,
pdata += 64;
- work_restart[thr_id].restart = 0;
-
/* For debugging */
union {
__m128i m;
diff --git a/sha256_sse2_i386.c b/sha256_sse2_i386.c
index 3008e0d..669781a 100644
--- a/sha256_sse2_i386.c
+++ b/sha256_sse2_i386.c
@@ -65,8 +65,6 @@ bool scanhash_sse2_32(int thr_id, const unsigned char *pmidstate,
pdata += 64;
- work_restart[thr_id].restart = 0;
-
/* Message expansion */
memcpy(m_midstate, pmidstate, sizeof(m_midstate));
memcpy(m_w, pdata, sizeof(m_w)); /* The 2nd half of the data */
diff --git a/sha256_sse4_amd64.c b/sha256_sse4_amd64.c
index 172da2b..a9cd685 100644
--- a/sha256_sse4_amd64.c
+++ b/sha256_sse4_amd64.c
@@ -62,8 +62,6 @@ bool scanhash_sse4_64(int thr_id, const unsigned char *pmidstate,
pdata += 64;
- work_restart[thr_id].restart = 0;
-
/* For debugging */
union {
__m128i m;
diff --git a/sha256_via.c b/sha256_via.c
index 2d7d773..35f4262 100644
--- a/sha256_via.c
+++ b/sha256_via.c
@@ -35,8 +35,6 @@ bool scanhash_via(int thr_id, const unsigned char *pmidstate,
unsigned long stat_ctr = 0;
int i;
- work_restart[thr_id].restart = 0;
-
/* bitcoin gives us big endian input, but via wants LE,
* so we reverse the swapping bitcoin has already done (extra work)
* in order to permit the hardware to swap everything