|
From: <wsh...@us...> - 2003-08-22 05:54:13
|
Update of /cvsroot/emc/rcslib/src/os_intf
In directory sc8-pr-cvs1:/tmp/cvs-serv11714/src/os_intf
Modified Files:
Tag: wps_multiplat_dev_branch
Makefile _timer.c shm.cc
Log Message:
.
Index: Makefile
===================================================================
RCS file: /cvsroot/emc/rcslib/src/os_intf/Makefile,v
retrieving revision 4.36.2.2
retrieving revision 4.36.2.3
diff -C2 -d -r4.36.2.2 -r4.36.2.3
*** Makefile 8 Aug 2003 15:08:50 -0000 4.36.2.2
--- Makefile 21 Aug 2003 20:24:15 -0000 4.36.2.3
***************
*** 8,12 ****
clean distclean check distcheck install:
! ../../etc/multiplatbuild.sh config $@
.PHONY: all config clean distclean check distcheck install
--- 8,12 ----
clean distclean check distcheck install:
! ../../etc/multiplatbuild.sh $@
.PHONY: all config clean distclean check distcheck install
Index: _timer.c
===================================================================
RCS file: /cvsroot/emc/rcslib/src/os_intf/_timer.c,v
retrieving revision 4.42.2.2
retrieving revision 4.42.2.3
diff -C2 -d -r4.42.2.2 -r4.42.2.3
*** _timer.c 18 Aug 2003 23:19:52 -0000 4.42.2.2
--- _timer.c 21 Aug 2003 20:24:15 -0000 4.42.2.3
***************
*** 104,107 ****
--- 104,111 ----
double etime_disable_time = 0.0;
+ #ifndef TWO_TO_THIRTYTWO
+ #define TWO_TO_THIRTYTWO (4294967296.00)
+ #endif
+
/* number of seconds from some epoch, to clock tick resolution */
double
***************
*** 145,148 ****
--- 149,172 ----
+ #if !defined(ETIME_RETURNED) && defined(HAVE_QUERYPERFORMANCECOUNTER) && defined(WIN32)
+ BOOL frequency_ok = 0;
+ BOOL counter_ok = 0;
+ LARGE_INTEGER frequency;
+ LARGE_INTEGER counter;
+ double dfreq;
+ double dcount;
+ frequency_ok = QueryPerformanceFrequency (&frequency);
+ counter_ok = QueryPerformanceCounter (&counter);
+ if (frequency_ok && counter_ok)
+ {
+ dfreq = frequency.HighPart * TWO_TO_THIRTYTWO + frequency.LowPart;
+ dcount = counter.HighPart * TWO_TO_THIRTYTWO + counter.LowPart;
+ if (dfreq > 0.0 && dcount > 0.0)
+ {
+ return (dcount / dfreq);
+ }
+ }
+ #define ETIME_RETURNED
+ #endif
#else /* HAVE_CONFIG_H */
***************
*** 281,285 ****
double dfreq;
double dcount;
- #define TWO_TO_THIRTYTWO (4294967296.00)
#endif
--- 305,308 ----
***************
*** 416,419 ****
--- 439,450 ----
usleep (useconds);
}
+ return;
+ #define ESLEEP_RETURNED
+ #endif
+
+ #if !defined(ESLEEP_RETURNED) && defined(WIN32) && defined(HAVE_SLEEPEX)
+ if (seconds_to_sleep <= 0.0)
+ return;
+ SleepEx (((unsigned long) (seconds_to_sleep * 1000)), FALSE);
return;
#define ESLEEP_RETURNED
Index: shm.cc
===================================================================
RCS file: /cvsroot/emc/rcslib/src/os_intf/shm.cc,v
retrieving revision 4.35
retrieving revision 4.35.2.1
diff -C2 -d -r4.35 -r4.35.2.1
*** shm.cc 6 May 2003 15:18:21 -0000 4.35
--- shm.cc 21 Aug 2003 20:24:15 -0000 4.35.2.1
***************
*** 42,46 ****
{
/* create shared memory */
! #if defined(VXWORKS) || defined(_Windows)
shm = rcs_shm_open (key, size, 1);
#else
--- 42,46 ----
{
/* create shared memory */
! #if defined(VXWORKS) || defined(_Windows) || defined(WIN32)
shm = rcs_shm_open (key, size, 1);
#else
|