1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-09 14:28:12 +00:00
Commit Graph

81 Commits

Author SHA1 Message Date
Jan Berdajs
0bd7a9ff63 After cancelling a thread (unless it's detached, but mining threads aren't), it is always necessary to join the thread so the system will release resources.
This also simplifies kill_mining a bit.
2014-07-07 12:35:27 +02:00
Jan Berdajs
25d7d426fd convert tabs to spaces in most commonly modified files 2014-06-09 17:45:06 +02:00
Jan Berdajs
e4a4efdb42 fix some potential memory leaks, remove a few old unused functions 2014-06-05 00:13:43 +02:00
Jan Berdajs
6c5ce535d9 fix compiler warnings 2014-05-29 01:34:29 +02:00
Noel Maersk
cc735db550 misc: don't violate reserved identifier naming convention.
Closes https://github.com/veox/sgminer/issues/177
2014-04-03 19:12:35 +03:00
Con Kolivas
f8b9e41f28 Check for when errno is set on windows as well as the windows variant for errors. 2014-02-16 15:08:00 +02:00
Con Kolivas
6b246a59f3 Handle interruptions to various select calls in util.c 2014-02-16 14:41:58 +02:00
Noel Maersk
50066cf3c7 misc: Replace all remaining instances of 'cgminer' with 'sgminer'.
sed again.
2014-01-15 16:36:48 +02:00
Con Kolivas
9628207066 Provide a helper function that can reset cgsems to zero. 2014-01-15 14:28:24 +02:00
Con Kolivas
669bcac36c Merge branch 'master' into hashfast 2013-10-23 12:06:20 +11:00
Con Kolivas
8dcbc86b97 Use windows' own higher resolution time and handlers allowing us to have higher precision absolute timeouts. 2013-10-23 10:19:04 +11:00
Con Kolivas
31e8ebaffa Merge branch 'master' into hashfast 2013-10-19 16:08:17 +11:00
Con Kolivas
3956382450 Send pthread_cancel to failed completion_timeout that has timed out. 2013-10-18 22:04:21 +11:00
Con Kolivas
f5baf9f57a Merge branch 'master' into hashfast
Conflicts:
	usbutils.h
2013-10-18 19:12:13 +11:00
ckolivas
7838af1dc1 Remove unused variables. 2013-10-18 10:51:44 +11:00
ckolivas
f826e35765 Provide a cg_completion_timeout helper function for unreliable functions that takes arbitrary functions and parameters and reliably returns. 2013-10-18 10:14:51 +11:00
Con Kolivas
e06e495ab8 Merge branch 'master' into hashfast 2013-10-14 15:07:32 +11:00
Con Kolivas
166200c094 Windows uses errno for WSAETIMEDOUT 2013-10-14 12:01:40 +11:00
Con Kolivas
6e948d8750 Check for correct timeout error in cgsem_mswait 2013-10-14 11:34:08 +11:00
Con Kolivas
51f8107b32 Fix util.h exports for cgsem_mswait 2013-10-14 11:27:04 +11:00
Con Kolivas
c75ce853a9 Implement a generic cgsem_mswait similar to sem_timedwait 2013-10-14 11:22:57 +11:00
Con Kolivas
9b5c534911 Merge branch 'master' into hashfast
Conflicts:
	api.c
	configure.ac
	miner.h
	usbutils.c
	usbutils.h
2013-10-13 16:41:53 +11:00
Con Kolivas
7318eceef9 Make the devlock a cglock in usbutils and only grab the write lock for fundamental changes allowing us to send and receive transfers concurrently without lock contention. 2013-10-07 23:34:01 +11:00
Con Kolivas
f49a3c7657 Merge branch 'master' into hashfast
Conflicts:
	Makefile.am
	api.c
	cgminer.c
	configure.ac
	miner.h
	usbutils.c
	usbutils.h
2013-09-30 08:43:29 +10:00
Con Kolivas
44b9cf50e3 Limit the duration we wait for reads in BF1 based on time already elapsed to account for other delays such as work restart messages or out of work. 2013-09-26 12:11:25 +10:00
Con Kolivas
cccee5d545 Fix util.h build from hashfast include. 2013-09-22 20:24:59 +10:00
Con Kolivas
466d3beca0 Provide a --disable-libcurl config option to build support for stratum mining only. 2013-09-21 22:49:28 +10:00
Con Kolivas
8ede407df7 Make extract_sockaddr set variables passed to it rather than pool struct members. 2013-09-05 23:10:19 +10:00
Con Kolivas
e1433f8ef8 Use timespecs on windows as cgtimer_t to capitalise on the higher resolution clock changes. 2013-08-22 13:49:22 +10:00
Con Kolivas
903d007cb4 Provide cgtimer_sub helper functions. 2013-08-20 22:47:13 +10:00
Con Kolivas
9dc63cee53 Provide cgtimer_to_ms helper functions. 2013-08-20 22:35:38 +10:00
Con Kolivas
7d0c9b5060 Rename cgsleep_prepare_r as cgtimer_time to get time in cgtimer_t format and call cgsleep_prepare_r as a macro for cgtimer_time 2013-08-20 22:27:14 +10:00
Con Kolivas
eeac9d81fc Replace all references to the old n*sleep functions with the equivalent cgsleep_*s replacements. 2013-08-20 19:23:49 +10:00
Con Kolivas
7d448cd754 timeGetTime uses huge resources on windows so revert to using timevals for its implementation of cgtimer_t 2013-08-19 23:39:49 +10:00
Con Kolivas
b238139cf9 Provide cgtimer_to_timeval helper functions. 2013-08-19 17:44:45 +10:00
Con Kolivas
09679e9f8b Provide a timeval_to_cgtime helper function to reuse values. 2013-08-19 17:38:20 +10:00
Con Kolivas
09e9091dd7 Simplify cgsleep code for windows by using a typedef for cgtimer_t that resolves to clock resolution, using that internally. 2013-08-19 13:54:56 +10:00
Con Kolivas
ad87db07d9 Make cgsleep_us_r take an int64_t for us. 2013-08-18 14:39:26 +10:00
Con Kolivas
621eb00309 Provide reentrant versions of cgsleep functions to allow start time to be set separately from the beginning of the actual sleep, allowing scheduling delays to be counted in the sleep. 2013-08-18 10:49:52 +10:00
Con Kolivas
0b5edb24f9 Make the nmsleep and nusleep functions use the new cgsleep functions internally till functions are migrated to the new cgsleep API. 2013-08-18 10:36:25 +10:00
Con Kolivas
188210a3d2 Add a ms_to_timespec helper function, and create a cgsleep_ms function that uses absolute timers with clock_nanosleep to avoid overruns. 2013-08-18 10:28:28 +10:00
Con Kolivas
99cbf09dd1 Add a timeraddspec helper function. 2013-08-18 00:38:29 +10:00
Con Kolivas
1bcd9a43b1 Provide a us_to_timespec helper function. 2013-08-18 00:34:01 +10:00
Con Kolivas
2278204ddd Provide a us_to_timeval helper function. 2013-08-18 00:27:33 +10:00
Con Kolivas
a6b1c31742 Add helper functions to convert timespec to timeval and vice versa. 2013-08-18 00:19:47 +10:00
Con Kolivas
e95ad0479f Nonce2 stratum submission is not working with nonce2 lengths >4, revert the buggy __bin2hex function and use bin2hex. 2013-08-13 22:44:22 +10:00
Con Kolivas
46b6b07afa Avoid a potential overflow should a pool specify a large nonce2 length with stratum. 2013-08-12 16:02:20 +10:00
Kano
48d91c7f2d cgsem - increase information on failure 2013-08-10 10:36:38 +10:00
ckolivas
9b2e517f30 Use cgsem structures instead of the flaky pings in the work queue to start mining threads and remove the unused thr_info_freeze function. 2013-06-09 12:20:04 +10:00
ckolivas
b59c33800b Implement cgminer specific cgsem semaphores to imitate unnamed semaphore behaviour on osx which does not support them. 2013-06-06 13:08:00 +10:00