diff options
author | Christopher Faylor <me@cgf.cx> | 2003-04-16 03:03:45 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2003-04-16 03:03:45 +0000 |
commit | c448f78fd56ef8d34474adc2678d6394a4d088ec (patch) | |
tree | 8b0177d10bddf05d3648e296b07ab13e218115e8 /winsup/cygwin/fhandler_proc.cc | |
parent | 9eed5df6392240b46c2506dcb37227ee73f5a806 (diff) | |
download | cygnal-c448f78fd56ef8d34474adc2678d6394a4d088ec.tar.gz cygnal-c448f78fd56ef8d34474adc2678d6394a4d088ec.tar.bz2 cygnal-c448f78fd56ef8d34474adc2678d6394a4d088ec.zip |
* termios.cc (setspeed): New function.
(cfsetospeed): Use setspeed to set speed.
(cfsetispeed): Use setspeed to set speed.
* autoload.cc: Add load statement for UuidCreate, and UuidCreateSequential.
* cpuid.h: New file.
* cygwin.din: Export gethostid.
* fhandler_proc.cc (cpuid): Move to cpuid.h.
(can_set_flag): Move to cpuid.h.
* syscalls.cc (gethostid): New function.
* version.h: Bump DLL minor version number to 83.
Diffstat (limited to 'winsup/cygwin/fhandler_proc.cc')
-rw-r--r-- | winsup/cygwin/fhandler_proc.cc | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/winsup/cygwin/fhandler_proc.cc b/winsup/cygwin/fhandler_proc.cc index b9f6b38df..28fe87948 100644 --- a/winsup/cygwin/fhandler_proc.cc +++ b/winsup/cygwin/fhandler_proc.cc @@ -28,6 +28,7 @@ details. */ #include <sys/param.h> #include "ntdll.h" #include <winioctl.h> +#include "cpuid.h" #define _COMPILING_NEWLIB #include <dirent.h> @@ -550,37 +551,6 @@ format_proc_stat (char *destbuf, size_t maxsize) bufptr += sizeof (x) - 1; \ } while (0) -static inline void -cpuid (unsigned *a, unsigned *b, unsigned *c, unsigned *d, unsigned in) -{ - asm ("cpuid" - : "=a" (*a), - "=b" (*b), - "=c" (*c), - "=d" (*d) - : "a" (in)); -} - -static inline bool -can_set_flag (unsigned flag) -{ - unsigned r1, r2; - asm("pushfl\n" - "popl %0\n" - "movl %0, %1\n" - "xorl %2, %0\n" - "pushl %0\n" - "popfl\n" - "pushfl\n" - "popl %0\n" - "pushl %1\n" - "popfl\n" - : "=&r" (r1), "=&r" (r2) - : "ir" (flag) - ); - return ((r1 ^ r2) & flag) != 0; -} - static _off64_t format_proc_cpuinfo (char *destbuf, size_t maxsize) { |