diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-10-22 12:26:01 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-10-22 12:26:01 +0200 |
commit | a043e7356e5eb2e7c0c09f0775d7647c8f2a0ece (patch) | |
tree | 3a1452e51a811170156c699e84b2cbe12f49dc63 /gcc/ada/adaint.c | |
parent | 229db35122a3015db205e642f515593ed1841a00 (diff) | |
download | gcc-a043e7356e5eb2e7c0c09f0775d7647c8f2a0ece.zip gcc-a043e7356e5eb2e7c0c09f0775d7647c8f2a0ece.tar.gz gcc-a043e7356e5eb2e7c0c09f0775d7647c8f2a0ece.tar.bz2 |
[multiple changes]
2010-10-22 Thomas Quinot <quinot@adacore.com>
* sem_ch3.adb (Complete_Private_Subtype): The full view of the subtype
may already have a rep item chain inherited from the full view of the
base type, so do not overwrite it when propagating rep items from the
partial view of the subtype.
* sem_ch3.adb: Minor code reorganization. Minor reformatting.
2010-10-22 Sergey Rybin <rybin@adacore.com>
* gnat_ugn.texi (gnatmetric): Remove description of debug option.
2010-10-22 Tristan Gingold <gingold@adacore.com>
* adaint.c (__gnat_number_of_cpus): Add implementation for VMS.
2010-10-22 Ed Schonberg <schonberg@adacore.com>
* par-ch5.adb: Set properly starting sloc of loop parameter.
From-SVN: r165818
Diffstat (limited to 'gcc/ada/adaint.c')
-rw-r--r-- | gcc/ada/adaint.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c index 3f4654f..b3e2e0ce 100644 --- a/gcc/ada/adaint.c +++ b/gcc/ada/adaint.c @@ -188,6 +188,9 @@ struct vstring char string[NAM$C_MAXRSS+1]; }; +#define SYI$_ACTIVECPU_CNT 0x111e +extern int LIB$GETSYI (int *, unsigned int *); + #else #include <utime.h> #endif @@ -2394,6 +2397,15 @@ __gnat_number_of_cpus (void) SYSTEM_INFO sysinfo; GetSystemInfo (&sysinfo); cores = (int) sysinfo.dwNumberOfProcessors; + +#elif defined (VMS) + int code = SYI$_ACTIVECPU_CNT; + unsigned int res; + int status; + + status = LIB$GETSYI (&code, &res); + if ((status & 1) != 0) + cores = res; #endif return cores; |