Commit Graph

121 Commits

Author SHA1 Message Date
Fish (David B. Trout)
a2e06edcc9 Fixes for unreliable console keepalive issue #44:
1. Fix configure.ac tcp.h header and keepalive constant checks and report during ./configure the keepalive support that was detected (none, basic or full).

2. #include the correct tcp.h header in hstdinc.h

3. Issue warning message at build time (during make) when full keepalive support is missing or partial.

4. Report partial or missing keepalive build support via version.c "With" and "Without" messages.

5. Issue error or warning in both impl.c as well as in 'conkpalv' command/statement processing function when keepalive support is either missing or only partially supported. Same for the 2703 device 'ka=' option too.

6. Enhance set_socket_keepalive function to let the caller know not only about failures but also about partial-only successes (so they can be reported).

7. Fix the bad setsockopt call in the Linux version of the set_socket_keepalive function that was using the wrong value, which was at the heart of the problem. (Note: setsockopt was returning "success" anyway even though it had actually failed! [to accomplish anything].)

8. Introduce new get_socket_keepalive function to allow retrieval and reporting of current keepalive settings for a given socket.

9. Manually maintain socket keepalive values for Windows builds so it too can support retrieval of current values via new get_socket_keepalive function. (see comments in w32util.c "get_socket_keepalive" function!)

10. Minor HTML documentation edits.
2015-01-19 13:35:29 -08:00
John P. Hartmann
677ac05291 Fish's patch to fix lots of portability issues. 2013-12-25 09:54:01 +01:00
Fish (David B. Trout)
2c221cbfde Use new VStudio version #defines 2013-10-05 09:06:10 -07:00
Fish (David B. Trout)
cf4f1b7e15 Remove bad ASSERT 2013-09-19 05:50:21 -07:00
dasdman
2824a46757 Use cached copy of thread handle in getrusage for Windows. 2013-08-24 14:28:29 -07:00
Fish (David B. Trout)
dbff865b99 HTHREADS/PTTRACE rework Part 2(b): Report abandoned locks
Still to be done: Part 3(a): fthreads R/W locks support
                  Part 3(b): Robust Mutexes support
2013-06-15 08:27:31 -07:00
Fish (David B. Trout)
81814c85c7 const 2013-05-16 12:06:52 -07:00
Fish (David B. Trout)
9db10e76c8 Favor SwitchToThread() over Sleep(0) in sched_yield 2013-02-12 07:03:31 -08:00
dasdman
c4bcd6ce5a Continue CPU timer fix 2012-12-26 22:34:02 -08:00
dasdman
080e86cd39 Enhanced CPU timer accuracy; CPU timer now based on CPU thread time instead of wall clock time. 2012-12-12 23:14:00 -08:00
Fish (David B. Trout)
8418ff70b6 Fix w32util clock_gettime HPC 64-bit integer overflow bug.
The integer arithmetic calculation to convert elapsed HPC ticks to nanoseconds was multiplying by 1,000,000,000 and then dividing by HPC ticks per second, but if the elapsed HPC ticks was sufficiently large (as it is on some hardware running older versions of Windows) the multiplying by one billion would overflow the 64-bit integer variable leading to an elapsed nanoseconds value of zero causing the emulated TOD clock to stall bringing the guest and sometimes Hercules itself to a screeching halt.

This fix addresses the problem by range checking the values used in every calculation to ensure the variables used will never overflow. As an unavoidable side effect of the change the resolution of the emulated TOD clock on some systems running older versions of Windows will be reduced from nanosecond accuracy to, typically, only 10 nanosecond accuracy. This is not seen as a problem since the existing TOD/ETOD clock handling already ensures clock values are always unique ever increasing values.
2012-11-06 10:04:09 -08:00
Fish (David B. Trout)
2b7e55fc16 BILLION/MILLION 2012-11-06 02:45:17 -08:00
Fish (David B. Trout)
0c340266e9 likely/unlikely 2012-11-06 02:42:56 -08:00
Fish (David B. Trout)
8751957416 LARGE_INTEGER -> ULARGE_INTEGER 2012-11-06 02:36:56 -08:00
Fish (David B. Trout)
74dfc268f4 Update comments; no functional change.
According to <http://msdn.microsoft.com/en-us/library/windows/desktop/ms644905(v=vs.85).aspx> "The frequency cannot change while the system is running".
2012-06-23 16:21:26 -07:00
dasdman
6db2769024 Improved TOD clock resolution; eliminated floating-point clock conversions under Windows; document interval timer conversion factors; corrected various clock stores. 2012-06-17 23:14:20 -07:00
Jan Jaeger
439bdbca92 Remove subversion $Id$ tag
Update copyright statement to 2012
2012-03-24 18:41:51 +11:00
Enrico Sorichetti
ff26338cb8 IPV6 configure support ( to disable it ) 2012-03-11 14:08:32 +01:00
Fish (David B Trout)
a78f864a0c MSVC support for IPV6 in ctc_ptp 2012-03-06 17:35:44 +01:00
Fish (David B Trout)
11e9be994b (cosmetic only; no functional change)
git-svn-id: file:///home/jj/hercules.svn/trunk@7773 956126f8-22a0-4046-8f4a-272fa8102e63
2011-09-21 02:16:27 +00:00
Fish (David B Trout)
a1ed31f316 Compiler warning refactoring cont'd: use new WARNING macro.
git-svn-id: file:///home/jj/hercules.svn/trunk@7767 956126f8-22a0-4046-8f4a-272fa8102e63
2011-09-20 12:11:17 +00:00
Fish (David B Trout)
ed53cc7a1a Fix a rare race condition in 'w32_poor_mans_fork' reported by Paul G.
git-svn-id: file:///home/jj/hercules.svn/trunk@7762 956126f8-22a0-4046-8f4a-272fa8102e63
2011-09-20 09:16:24 +00:00
Paul Gorlinsky
31c9a99803 Remove LOGMSG macro. Change LOGMSG to logmsg. Rename log_msg() to logmsg().
git-svn-id: file:///home/jj/hercules.svn/trunk@7688 956126f8-22a0-4046-8f4a-272fa8102e63
2011-08-12 23:28:17 +00:00
Paul Gorlinsky
e0f4288809 Use secure form of s_open. Add debug message.
git-svn-id: file:///home/jj/hercules.svn/trunk@7682 956126f8-22a0-4046-8f4a-272fa8102e63
2011-08-10 21:50:02 +00:00
Paul Gorlinsky
2c2eaf37dc Restore code regressed by latest changes.
git-svn-id: file:///home/jj/hercules.svn/trunk@7678 956126f8-22a0-4046-8f4a-272fa8102e63
2011-08-09 02:00:07 +00:00
Jan Jaeger
032e72e79b Revert to lowercase logmsg()
git-svn-id: file:///home/jj/hercules.svn/trunk@7669 956126f8-22a0-4046-8f4a-272fa8102e63
2011-08-07 00:09:14 +00:00
Paul Gorlinsky
47f306d108 Revert bzero(d,s) to memset(d,0,s).
git-svn-id: file:///home/jj/hercules.svn/trunk@7604 956126f8-22a0-4046-8f4a-272fa8102e63
2011-07-22 19:23:35 +00:00
Paul Gorlinsky
1a68ab747f Revert bzero(d,s) to memset(d,0,s).
git-svn-id: file:///home/jj/hercules.svn/trunk@7603 956126f8-22a0-4046-8f4a-272fa8102e63
2011-07-22 17:17:13 +00:00
Paul Gorlinsky
9083dcf949 Add inline bzero function. Change memset(x, 0, l) to bzero(x, l)
git-svn-id: file:///home/jj/hercules.svn/trunk@7601 956126f8-22a0-4046-8f4a-272fa8102e63
2011-07-20 01:49:14 +00:00
Paul Gorlinsky
03a4560910 Update Copyright notices to 2011.
git-svn-id: file:///home/jj/hercules.svn/trunk@7593 956126f8-22a0-4046-8f4a-272fa8102e63
2011-07-18 22:19:10 +00:00
Fish (David B Trout)
667f6b7258 Re-instate SVN 7275 change, but for Windows MSVC only.
(Controlled by OPTION_CALLOC_GUESTMEM macro in hmacros.h)
Non-Windows builds SHOULD be completely unaffected.


git-svn-id: file:///home/jj/hercules.svn/trunk@7585 956126f8-22a0-4046-8f4a-272fa8102e63
2011-07-18 14:44:37 +00:00
Paul Gorlinsky
fd0c9f844f Regress SVN 7275 in order to diagnose reported Linux errors.
git-svn-id: file:///home/jj/hercules.svn/trunk@7538 956126f8-22a0-4046-8f4a-272fa8102e63
2011-06-30 22:24:09 +00:00
Fish (David B Trout)
3bc12087ce (additional comments -- no functional change)
git-svn-id: file:///home/jj/hercules.svn/trunk@7518 956126f8-22a0-4046-8f4a-272fa8102e63
2011-06-21 20:12:23 +00:00
Fish (David B Trout)
b77393a1ec Fix MSVC nanosleep/usleep bug wherein subsequent calls were always overriding previous calls.
git-svn-id: file:///home/jj/hercules.svn/trunk@7516 956126f8-22a0-4046-8f4a-272fa8102e63
2011-06-21 04:04:13 +00:00
Fish (David B Trout)
aee52bd2c7 (a yet even BETTER fix than SVN# 7495!)
(I'm done now)


git-svn-id: file:///home/jj/hercules.svn/trunk@7496 956126f8-22a0-4046-8f4a-272fa8102e63
2011-06-04 23:15:53 +00:00
Fish (David B Trout)
08fabfbe43 (an arguably more correct fix than SVN# 7494)
git-svn-id: file:///home/jj/hercules.svn/trunk@7495 956126f8-22a0-4046-8f4a-272fa8102e63
2011-06-04 23:01:18 +00:00
Fish (David B Trout)
68f78349d3 Fix 4.5 year old bug (!) first introduced by me in SVN# 4177.
git-svn-id: file:///home/jj/hercules.svn/trunk@7494 956126f8-22a0-4046-8f4a-272fa8102e63
2011-06-04 22:55:14 +00:00
Fish (David B Trout)
3dea16cb9e typo: "_O_CREAT" should be "O_CREAT" for cross-platform compatibility
git-svn-id: file:///home/jj/hercules.svn/trunk@7432 956126f8-22a0-4046-8f4a-272fa8102e63
2011-04-21 21:29:53 +00:00
Fish (David B Trout)
4c60697db2 Fix file opens to open files in non-multi-write-shared mode
(Windows-only for now; non-Windows yet to be implemented)

git-svn-id: file:///home/jj/hercules.svn/trunk@7431 956126f8-22a0-4046-8f4a-272fa8102e63
2011-04-21 02:17:35 +00:00
Paul Gorlinsky
893fceadc0 Minor cleanup of reserve word usage, casting and use secure version of functions
git-svn-id: file:///home/jj/hercules.svn/trunk@7344 956126f8-22a0-4046-8f4a-272fa8102e63
2011-03-03 17:47:16 +00:00
Paul Gorlinsky
9081b644c7 Function logmsg() renamed to log_msg(). LOGMSG define added. All logmsg calls changed to LOGMSG.
git-svn-id: file:///home/jj/hercules.svn/trunk@7333 956126f8-22a0-4046-8f4a-272fa8102e63
2011-02-23 03:48:52 +00:00
Fish (David B Trout)
906db135de page-aligned calloc for mainstor/xpndstor
git-svn-id: file:///home/jj/hercules.svn/trunk@7275 956126f8-22a0-4046-8f4a-272fa8102e63
2011-01-15 22:56:50 +00:00
Fish (David B Trout)
06984f5d02 Allow //./Tape0 or \\.\Tape0 for Windows device filename
git-svn-id: file:///home/jj/hercules.svn/trunk@7152 956126f8-22a0-4046-8f4a-272fa8102e63
2010-12-02 04:32:39 +00:00
Paul Gorlinsky
a46e65118b Increase FD count in windows from 512 to 2048
git-svn-id: file:///home/jj/hercules.svn/trunk@7125 956126f8-22a0-4046-8f4a-272fa8102e63
2010-11-24 01:35:42 +00:00
Paul Gorlinsky
a4a9a61b0b Correct Windows build Issues; More capping enhancements
git-svn-id: file:///home/jj/hercules.svn/trunk@7111 956126f8-22a0-4046-8f4a-272fa8102e63
2010-11-17 21:52:29 +00:00
Paul Gorlinsky
a7662eeefb Enhance hostinfo
git-svn-id: file:///home/jj/hercules.svn/trunk@7058 956126f8-22a0-4046-8f4a-272fa8102e63
2010-11-06 01:19:31 +00:00
Paul Gorlinsky
ecf89bc01a Remove VS2008 dependency
git-svn-id: file:///home/jj/hercules.svn/trunk@7054 956126f8-22a0-4046-8f4a-272fa8102e63
2010-11-05 03:57:56 +00:00
Paul Gorlinsky
433861d550 Enhance hostinfo
git-svn-id: file:///home/jj/hercules.svn/trunk@7051 956126f8-22a0-4046-8f4a-272fa8102e63
2010-11-05 03:34:55 +00:00
Paul Gorlinsky
56d0988a30 Enhancements to hostinfo. Addition of cache information, linesize, cachesize, etc.
git-svn-id: file:///home/jj/hercules.svn/trunk@7046 956126f8-22a0-4046-8f4a-272fa8102e63
2010-11-03 20:30:53 +00:00
Paul Gorlinsky
9835becc67 Add information to hostinfo pagesize, allocsize, etc.
git-svn-id: file:///home/jj/hercules.svn/trunk@6999 956126f8-22a0-4046-8f4a-272fa8102e63
2010-10-28 16:39:40 +00:00