util.h


Log

Author Commit Date CI Message
Con Kolivas 166200c0 2013-10-14T12:01:40 Windows uses errno for WSAETIMEDOUT
Con Kolivas 6e948d87 2013-10-14T11:34:08 Check for correct timeout error in cgsem_mswait
Con Kolivas 51f8107b 2013-10-14T11:27:04 Fix util.h exports for cgsem_mswait
Con Kolivas c75ce853 2013-10-14T11:22:57 Implement a generic cgsem_mswait similar to sem_timedwait
Con Kolivas 7318ecee 2013-10-07T23:34:01 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.
Con Kolivas 59ff31d8 2013-10-07T17:11:33 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.
Con Kolivas 44b9cf50 2013-09-26T12:11:25 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.
Con Kolivas 466d3bec 2013-09-21T22:49:28 Provide a --disable-libcurl config option to build support for stratum mining only.
Con Kolivas 8ede407d 2013-09-05T23:10:19 Make extract_sockaddr set variables passed to it rather than pool struct members.
Con Kolivas e1433f8e 2013-08-22T13:49:22 Use timespecs on windows as cgtimer_t to capitalise on the higher resolution clock changes.
Con Kolivas 903d007c 2013-08-20T22:47:13 Provide cgtimer_sub helper functions.
Con Kolivas 9dc63cee 2013-08-20T22:35:38 Provide cgtimer_to_ms helper functions.
Con Kolivas 7d0c9b50 2013-08-20T22:27:14 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
Con Kolivas eeac9d81 2013-08-20T19:23:49 Replace all references to the old n*sleep functions with the equivalent cgsleep_*s replacements.
Con Kolivas 7d448cd7 2013-08-19T23:39:49 timeGetTime uses huge resources on windows so revert to using timevals for its implementation of cgtimer_t
Con Kolivas b238139c 2013-08-19T17:44:45 Provide cgtimer_to_timeval helper functions.
Con Kolivas 09679e9f 2013-08-19T17:38:20 Provide a timeval_to_cgtime helper function to reuse values.
Con Kolivas 09e9091d 2013-08-19T13:54:56 Simplify cgsleep code for windows by using a typedef for cgtimer_t that resolves to clock resolution, using that internally.
Con Kolivas ad87db07 2013-08-18T14:30:54 Make cgsleep_us_r take an int64_t for us.
Con Kolivas 621eb003 2013-08-18T10:49:52 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.
Con Kolivas 0b5edb24 2013-08-18T10:36:25 Make the nmsleep and nusleep functions use the new cgsleep functions internally till functions are migrated to the new cgsleep API.
Con Kolivas 188210a3 2013-08-18T10:28:28 Add a ms_to_timespec helper function, and create a cgsleep_ms function that uses absolute timers with clock_nanosleep to avoid overruns.
Con Kolivas 99cbf09d 2013-08-18T00:38:29 Add a timeraddspec helper function.
Con Kolivas 1bcd9a43 2013-08-18T00:34:01 Provide a us_to_timespec helper function.
Con Kolivas 2278204d 2013-08-18T00:27:33 Provide a us_to_timeval helper function.
Con Kolivas a6b1c317 2013-08-18T00:19:47 Add helper functions to convert timespec to timeval and vice versa.
Con Kolivas e95ad047 2013-08-13T22:44:22 Nonce2 stratum submission is not working with nonce2 lengths >4, revert the buggy __bin2hex function and use bin2hex.
Con Kolivas 46b6b07a 2013-08-12T16:02:20 Avoid a potential overflow should a pool specify a large nonce2 length with stratum.
Kano 48d91c7f 2013-08-10T10:36:38 cgsem - increase information on failure
ckolivas 9b2e517f 2013-06-09T12:20:04 Use cgsem structures instead of the flaky pings in the work queue to start mining threads and remove the unused thr_info_freeze function.
ckolivas b59c3380 2013-06-06T13:08:00 Implement cgminer specific cgsem semaphores to imitate unnamed semaphore behaviour on osx which does not support them.
Con Kolivas d52ab244 2013-05-28T23:00:14 Provide an nusleep equivalent function to nmsleep.
Kano 863c9e27 2013-04-26T14:49:10 util.c str_text make a fully text readable version of str
Con Kolivas a2a7a036 2013-04-24T23:05:44 Create an OS specific sock_blocks function.
Con Kolivas d2abaa83 2013-04-22T10:49:10 Provide wrappers for commonly used timer routines with API stats.
Con Kolivas 62a1403b 2013-04-21T19:41:54 Move util.c exports to util.h
Con Kolivas 3d7f8243 2013-04-21T19:02:44 Create a cgminer specific gettimeofday wrapper that is always called with tz set to NULL and increases the resolution on windows.
Con Kolivas 4cde791e 2013-02-15T21:31:44 Provide basic framework for restarting stratum depending on whether resume support exists or not.
Con Kolivas 51d11a28 2013-02-04T10:19:12 Provide a wrapper for aligning lengths of size_t to 4 byte boundaries.
Con Kolivas 6e2e7d36 2012-12-29T10:46:55 Differentiate socket full from sock full.
Con Kolivas 944af31b 2012-12-26T09:31:41 Parse anything in the stratum socket if it's full without waiting. Empty the socket even if a connection is not needed in case there are share returns.
Con Kolivas fc5d3a0e 2012-12-03T09:52:46 Suspend stratum connections to backup pools when there is no requirement to potentially grab work from them.
Con Kolivas 16637ac9 2012-12-03T08:14:24 Fix missing export for RenameThread.
Con Kolivas f94cff77 2012-12-02T18:06:55 Microoptimise and remove redundant copy of strdup function in calloc_strcat.
Con Kolivas 0ae02c6e 2012-12-01T08:26:31 Since we will be using calloc_str to put a string into it, convert the function to calloc_strcat which does it automatically.
Con Kolivas ee8609d9 2012-11-29T12:48:17 Provide helper functions calloc_str and realloc_strcat to create and extend arbitrary length arrays based on string length.
Paul Sheppard 9f74e650 2012-11-04T20:13:49 Tidy up device error counts
Con Kolivas 1afb794c 2012-10-07T13:56:28 Cast socketfail to integer since SOCKET is an unsigned int on windows.
Con Kolivas a8d69302 2012-10-05T12:37:29 Move stratum sockets to curl infrastructure with locking around send+recv to begin support for proxies and ssl.
Con Kolivas deb0a9b6 2012-10-04T23:18:33 Windows doesn't work with MSG_PEEK on recv so move to a continuously updating buffer for incoming messages.
Con Kolivas c113534f 2012-10-04T15:35:28 Begin support for mingw stratum build. Conflicts: configure.ac
Con Kolivas b5617734 2012-09-30T23:10:43 Provide locking around stratum send operations to avoid races.
Con Kolivas 2de95151 2012-09-30T20:24:24 Abstract out share submit as a function to be useable by stratum.
Con Kolivas 739cba28 2012-09-30T19:19:46 Rename parse_stratum to parse_method as it is only for stratum messages that contain methods.
Con Kolivas 7415d7aa 2012-09-29T16:10:13 Begin implementing a hash database of submissions and attempt sending results.
Con Kolivas 56255a0c 2012-09-28T18:01:33 Create a stratum thread per pool that has stratum that monitors the socket and serves received data.
Con Kolivas a6f1a622 2012-09-28T04:35:16 Create helper functions for checking when a socket is ready to read on and receive a single line at a time. Begin stratum authorisation process.
Con Kolivas a1b17229 2012-09-26T15:23:01 Initiate stratum and grab first json result.
Con Kolivas 58873c1d 2012-09-25T20:23:59 Get detailed addressinfo from the parsed URL for future raw socket usage when possible. IPV4 only for now.
Con Kolivas ee3b7865 2012-09-25T05:46:07 Prepare for getaddrinfo call.
Con Kolivas 144a0160 2012-09-24T16:50:04 Add data structures to pool struct for socket communications.
Con Kolivas b3cdd802 2012-09-24T16:27:47 Put all socket definitions in util.h to allow reusing by added socket functions to be used in util.c.