Con Kolivas
8745ba1e6d
Windows' timer resolution is limited to 15ms accuracy. This was breaking dynamic intensity since it tries to measure below this.
...
Since we are repeatedly sampling similar timeframes, we can average the gpu_us result over 5 different values to get very fine precision.
2012-08-15 09:38:45 +10:00
Luke Dashjr
9c648c1749
Bugfix: Calculate nsec in nmsleep correctly
...
The old algorithm (msecs * 1000000) - (sec / 1000000000) gets total nsec,
including seconds, since the sec/1e9 should be multiplying. It's also
vulnerable to easy overflows. Using ldiv gets the quotient and remainder
in a single operation (at least on x86) and avoids overflow.
2012-07-11 20:10:52 +00:00
Con Kolivas
bc0b14063f
Cope with signals interrupting the nanosleep of nmsleep.
2012-07-08 21:35:19 +10:00
Con Kolivas
3271be145f
Provide a ms based sleep function that uses nanosleep to avoid the inaccuracy of usleep on SMP systems.
2012-07-06 15:01:39 +10:00
ckolivas
1a43f79547
Mingw doesn't support asprintf, use sprintf.
2012-07-01 12:02:10 +10:00
ckolivas
1e9421475c
Timersub is supported on all build platforms so do away with custom timerval_subtract function.
2012-07-01 10:44:23 +10:00
ckolivas
75ea616422
Minor style police on util.c
2012-07-01 10:35:08 +10:00
ckolivas
8f954d40ec
Get rid of unused result warning with asprintf.
2012-07-01 10:17:12 +10:00
Con Kolivas
3267b534a8
Implement rudimentary X-Mining-Hashrate support.
2012-06-28 10:43:52 +10:00
ckolivas
c5a21fabf0
Extend nrolltime to support the expiry= parameter. Do this by turning the rolltime bool into an integer set to the expiry time. If the pool supports rolltime but not expiry= then set the expiry time to the standard scantime.
2012-06-23 23:43:22 +10:00
Con Kolivas
268039cc7e
Indentation clean up.
2012-04-28 00:32:47 +10:00
Con Kolivas
eda382990a
Create one longpoll thread per pool, using backup pools for those pools that don't have longpoll.
...
Use the work created from the longpoll return only if we don't have failover-enabled, and only flag the work as a longpoll if it is the current pool.
This will work around the problem of trying to restart the single longpoll thread on pool changes that was leading to race conditions.
It will also have less work restarts from the multiple longpolls received from different pools.
2012-04-27 11:58:47 +10:00
Con Kolivas
9609dbc42d
Set lp_path to NULL after free for consistency.
2012-04-20 21:09:37 +10:00
nelisky
17b9baa9da
Removing dmalloc import left behind by mistake
2012-04-20 03:36:42 -07:00
nelisky
44bcb69ccd
Fixing leak in resp_hdr_cb
...
Memory is allocated for key and val, and longpoll address, when found, is stored in the header_info and prevented from being freed there. This pointer is stored during pool probing but once that's done it was just being lost.
Not so visible but also leaking was the refuse reason string.
2012-04-19 14:45:40 -07:00
Luke Dashjr
ed8382c88d
Make curses TUI support optional at compile-time.
2012-03-12 18:38:45 -04:00
Con Kolivas
d1cddf8bad
Update licensing to GPL V3.
2012-02-21 22:23:07 +11:00
Con Kolivas
f4284a21a8
Set the lp_sent variable under lock since there will almost always be a race on setting this variable, potentially leading to multiple LPs being sent
...
out.
2012-02-21 09:22:04 +11:00
Con Kolivas
fe4b5e1fc6
Set the lp_sent bool earlier to minimise the number of extra longpolls sent out.
2012-02-20 08:26:46 +11:00
Con Kolivas
39906718d2
Keep track of when a longpoll has been sent for a pool and if the current pool is requesting work but has not sent a longpoll request, convert one of
...
the work items to a longpoll as we may have switched pools but still be using the longpoll from the previous pool.
2012-02-19 22:07:31 +11:00
Con Kolivas
810ad04578
More copyright updates.
2012-02-18 23:16:08 +11:00
Con Kolivas
be9db9ce63
Copyright updates.
2012-02-18 23:00:21 +11:00
Con Kolivas
06721957a0
Freeze the queues on all threads that are sent the pause message to prevent them trying to start up again with saved pings in their queues.
2012-02-18 16:34:06 +11:00
Con Kolivas
3d3a3a2f3a
Fix unused warnings on win32.
2012-02-15 21:42:12 +11:00
Luke Dashjr
9631c0b02a
Fix initialization warning with jansson 1.3
2012-02-15 21:29:15 +11:00
Con Kolivas
56907db2d6
Fix harmless warnings with -Wsign-compare to allow cgminer to build with -W.
2012-02-12 18:21:30 +11:00
Con Kolivas
111238489f
Fix missing field initialisers warnings.
2012-02-12 17:53:50 +11:00
Con Kolivas
07c2ee5317
Put win32 equivalents of nanosleep and sleep into compat.h fixing sleep() for adl.c.
2012-02-12 17:00:44 +11:00
zefir
e0fec35751
modularized logging, support for priority based logging
...
Functions related to logging are extracted into dedicated source files
for better maintainability.
The existing low-level logging API is extended with a generalized scheme
providing log functions log_{error, warning, notice, info, debug} that
log messages based on a global opt_log_level.
opt_log_level for now is set to LOG_NOTICE and might be modified via
command line options or config files in future releases.
2012-02-11 20:26:25 +01:00
Con Kolivas
405a2120f8
Remove unnecessary check for opt_debug on every invocation of applog at LOG_DEBUG and place the check in applog().
2012-02-11 20:11:18 +11:00
Con Kolivas
b706da9374
Merge branch 'reject_reason' of https://github.com/luke-jr/cgminer into reject
2012-02-11 14:55:12 +11:00
Con Kolivas
5b4761003c
Move from the thread safe localtime_r to regular localtime which is the only one supported on newer pthread libraries on mingw32 to make it compile with
...
the newer ming. Thread safety is of no importance where localtime is used in this code.
2012-02-09 21:54:23 +11:00
Luke Dashjr
f7a9897e13
Display X-Reject-Reason, when provided
2012-02-06 09:44:42 -05:00
Con Kolivas
de4c6c29d7
Provide support for the submitold extension on a per-pool basis based on the value being detected in a longpoll.
2012-02-06 18:12:22 +11:00
Con Kolivas
e57ac0177f
Remove unused get_dondata function.
2012-02-05 22:43:42 +11:00
Con Kolivas
36d2fa485c
Silence unused parameter warnings.
2012-02-05 22:39:28 +11:00
ckolivas
13fa5772ad
Probe but don't set the timeout to 15 seconds as some networks take a long time to timeout.
2012-02-04 20:04:49 +11:00
ckolivas
1832b20c40
Revert "Some networks can take a long time to resolve so go back to 60 second timeouts instead of 15."
...
This reverts commit c86a670ce6
.
This changed more than just the timeout.
2012-02-04 20:04:07 +11:00
ckolivas
c86a670ce6
Some networks can take a long time to resolve so go back to 60 second timeouts instead of 15.
2012-02-04 13:06:04 +11:00
Con Kolivas
bdec295fee
Set the latest network access time on share submission for --net-delay even if we're not delaying that submission for further network access.
2012-01-30 17:58:22 +11:00
Kano
b188157c2f
Resume advertising midstate support
2012-01-30 16:43:14 +11:00
Con Kolivas
3de7c7f9c2
Stop advertising midstate support until it's fixed.
2012-01-30 15:51:46 +11:00
Con Kolivas
09184720c2
As share submission is usually staggered, and delays can be costly, submit shares without delay even when --net-delay is enabled.
2012-01-30 15:09:58 +11:00
Con Kolivas
82af288e69
Revert "Fix various harmless warnings."
...
This reverts commit a4b67f030f
.
2012-01-29 22:57:29 +11:00
Con Kolivas
a4b67f030f
Fix various harmless warnings.
2012-01-29 21:06:17 +11:00
Luke Dashjr
fe88648e5d
Advertise longpoll support in X-Mining-Extensions
2012-01-26 23:32:50 +11:00
Con Kolivas
6442c1aba0
Style police.
2012-01-22 20:36:57 +11:00
Midnight Magic
21633b9bee
Bringing back TCP_NODELAY, but also ensuring it doesn't conflict with
...
--net-delay : Nagle's may infact delay some packets longer than
necessary..
2012-01-22 01:07:53 -08:00
Con Kolivas
e15d57d729
Implement socks4 proxy support.
2012-01-22 09:36:21 +11:00
Con Kolivas
5179d22463
Introduce a --net-delay option which guarantees at least 250ms between any networking requests to not overload slow routers.
2012-01-20 15:36:42 +11:00