On Fri, 8 Sep 2000, John Summerfield wrote:
>The whole idea of naming a numeric datatype "int" was a pretty poor idea.
>"long int" etc are little better. I prefer PL/1's fixed bin(31) - one defines
>the sice of the fixed-point number (31 bits plus sign) and representation
>(binary). It also al
>
> I'll bet there are more as well. There are also architectures
> that arrange the bit order inside the bytes differently for what
> it is worth.
I know Intel NAMES them back-to-front. I started out in a simple world:
Memory locations numbered (as one might view them) left to right.
Bytes|c
> On Thu, 7 Sep 2000, John Summerfield wrote:
>
> >> >int main(void)
> >> >{
> >> >printf("%ld CPUs online\n", sysconf(_SC_NPROCESSORS_ONLN));
> ^^^
>
> >[root@dugite /root]# man getconf
> >No manual entry for getconf
> >[root@dugite /root]# getconf _N
On Thu, 7 Sep 2000, John Summerfield wrote:
>> >int main(void)
>> >{
>> >printf("%ld CPUs online\n", sysconf(_SC_NPROCESSORS_ONLN));
^^^
>[root@dugite /root]# man getconf
>No manual entry for getconf
>[root@dugite /root]# getconf _NPROCESSORS_ONLN
>1
>
On Thu, 7 Sep 2000, John Summerfield wrote:
>> Uh, you realize that for some architectures it isn't 1-2-3-4 if you
>> store 0x01020304 into a double-word. It might be 2-1-4-3 o
>> something else perverse.
>
>In 30 years, I've only seen two orders of arranging bytes in ints.
>
>There other repres
gt; From: "Derek Tattersall" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, September 04, 2000 12:27 PM
> Subject: Re: SMP question ?
>
> > * Mikael Aronsson ([EMAIL PROTECTED]) [000904 03:16]:
> > >
> > > Hi !
> > >
&g
>
> - Original Message -
> From: John Summerfield <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, September 05, 2000 16:39
> Subject: Re: SMP question ?
>
>
> >
> > >
> > > This sort of thing is inherently a no
> On Tue, 5 Sep 2000, Matt Wilson wrote:
>
> >#include
> >
> >int main(void)
> >{
> >printf("%ld CPUs online\n", sysconf(_SC_NPROCESSORS_ONLN));
> >return 0;
> >}
> >
> >from shell:
> >
> >$ getconf _NPROCESSORS_ONLN
>
> Drat! That is one thing that bugs me about Linux... You hunt
> a
From: Mike A. Harris <[EMAIL PROTECTED]>
> On Wed, 6 Sep 2000, John Summerfield wrote:
>
> >> This sort of thing is inherently a non-portable problem like
> >> detecting endianness and other such things. It is unlikely any
> >
> >Detecting endianness isn't hard to do portably. I did it about 20 y
On Wed, 6 Sep 2000, John Summerfield wrote:
>> This sort of thing is inherently a non-portable problem like
>> detecting endianness and other such things. It is unlikely any
>
>Detecting endianness isn't hard to do portably. I did it about 20 years ago,
>in COBOL, when coding for a Honeywell mi
On Tue, 5 Sep 2000, Matt Wilson wrote:
>#include
>
>int main(void)
>{
>printf("%ld CPUs online\n", sysconf(_SC_NPROCESSORS_ONLN));
>return 0;
>}
>
>from shell:
>
>$ getconf _NPROCESSORS_ONLN
Drat! That is one thing that bugs me about Linux... You hunt
around looking for the wheel, and
At 05:39 9/6/00 +0800, John Summerfield wrote:
> > This sort of thing is inherently a non-portable problem like
> > detecting endianness and other such things. It is unlikely any
>
>Detecting endianness isn't hard to do portably. I did it about 20 years ago,
>in COBOL, when coding for a Honeywell
- Original Message -
From: John Summerfield <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, September 05, 2000 16:39
Subject: Re: SMP question ?
>
> >
> > This sort of thing is inherently a non-portable problem like
> > detecting endiann
>
> This sort of thing is inherently a non-portable problem like
> detecting endianness and other such things. It is unlikely any
Detecting endianness isn't hard to do portably. I did it about 20 years ago,
in COBOL, when coding for a Honeywell mini. The owners didn't know whether it
was beg
from C:
#include
int main(void)
{
printf("%ld CPUs online\n", sysconf(_SC_NPROCESSORS_ONLN));
return 0;
}
from shell:
$ getconf _NPROCESSORS_ONLN
Cheers,
Matt
On Mon, Sep 04, 2000 at 09:08:25AM +0100, Mikael Aronsson wrote:
> Hi !
>
> What is the best way to detect the number of C
LE end machine */
}
Martin
-Original Message-
From: Mike A. Harris [mailto:[EMAIL PROTECTED]]
Sent: 05 September 2000 09:03
To: [EMAIL PROTECTED]
Subject: Re: SMP question ?
On Mon, 4 Sep 2000, Mikael Aronsson wrote:
>Yes I know, but what I was looking for was a portable system ca
On Mon, 4 Sep 2000, Mikael Aronsson wrote:
>Yes I know, but what I was looking for was a portable system call that could
>be used from inside an application to detect the number of CPU's, how about
>other UNIX systems, do they have a proc/cpuinfo to ?
This sort of thing is inherently a non-porta
On Mon, 4 Sep 2000, Mikael Aronsson wrote:
>What is the best way to detect the number of CPU's ?, I guess I
>could look in /proc/cpuinfo, but is there a better more
>portable way to do it ?
I don't believe so. /proc/cpuinfo is there for that purpose.
It'd be nice if Linux got a binary interfa
On Mon, 4 Sep 2000, Derek Tattersall wrote:
>Date: Mon, 4 Sep 2000 07:27:38 -0400
>From: Derek Tattersall <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Content-Type: text/plain; charset=us-ascii
>Subject: Re: SMP question ?
>
>* Mikael Aronsson ([EMAIL PROTECTED]
Hi,
> Yes I know, but what I was looking for was a portable system call that could
> be used from inside an application to detect the number of CPU's, how about
> other UNIX systems, do they have a proc/cpuinfo to ?
As far as I can see, Solaris (SunOS 5.5) does not have a /proc/cpuinfo.
The "p
AIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, September 04, 2000 12:27 PM
Subject: Re: SMP question ?
> * Mikael Aronsson ([EMAIL PROTECTED]) [000904 03:16]:
> >
> > Hi !
> >
> > What is the best way to detect the number of CPU's ?, I guess I could
* Mikael Aronsson ([EMAIL PROTECTED]) [000904 03:16]:
>
> Hi !
>
> What is the best way to detect the number of CPU's ?, I guess I could look in
>/proc/cpuinfo, but is there a better more portable way to do it ?
>
> Mikael
>
grep -c "processor" /proc/cpuinfo
gives the number of processors.
-
Hi !
What is the best way to detect the number of CPU's
?, I guess I could look in /proc/cpuinfo, but is there a better more portable
way to do it ?
Mikael
23 matches
Mail list logo