Re: C/C++ call to detect cpu?
On Saturday 21 January 2006 15:33, John Levine wrote: Other than 'grep'ing dmesg, is there a way to know the current cpu such as a struct with the machine's cpu and cpu feature (kinda like a time_t struct)? $ sysctl hw.model hw.model: AMD Athlon(tm) 64 Processor 3000+ If you want more details write a tiny assembler routine that does a CPUID instruction and decode the result. Intel has a detailed application note about it at http://developer.intel.ru/design/xeon/applnots/241618.htm R's, John Thanks, that was great help, I was able to get the Processor Name string using info from that pdf. Using asm instead of sysctl will ensure a bit more portability. Unfortunatly, getting the actual processor speed (in Mhz) is more complicated according to that pdf, would you have any suggestions? Thanks, Nicolas. -- FreeBSD 7.0-CURRENT #0: Sat Jan 21 11:33:22 EST 2006 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/CLK01A PGP? (updated 16 Nov 05) : http://www.clkroot.net/security/nb_root.asc pgp0D90kwoQcw.pgp Description: PGP signature
Re: C/C++ call to detect cpu?
Nicolas, I have commented assembler code for the intel family of CPU's. This code goes back to the i386 and also takes into account the CPU string, and will calculate the clock speed. I do call this as a library function from c/c++ programs. Unfortunately this is written for Microsoft's MASM, and I have never ported it to gas. If you want a copy I can send you the assembler source code and/or the commented listing as well. -Derek At 05:50 PM 1/22/2006, Nicolas Blais wrote: On Saturday 21 January 2006 15:33, John Levine wrote: Other than 'grep'ing dmesg, is there a way to know the current cpu such as a struct with the machine's cpu and cpu feature (kinda like a time_t struct)? $ sysctl hw.model hw.model: AMD Athlon(tm) 64 Processor 3000+ If you want more details write a tiny assembler routine that does a CPUID instruction and decode the result. Intel has a detailed application note about it at http://developer.intel.ru/design/xeon/applnots/241618.htm R's, John Thanks, that was great help, I was able to get the Processor Name string using info from that pdf. Using asm instead of sysctl will ensure a bit more portability. Unfortunatly, getting the actual processor speed (in Mhz) is more complicated according to that pdf, would you have any suggestions? Thanks, Nicolas. -- FreeBSD 7.0-CURRENT #0: Sat Jan 21 11:33:22 EST 2006 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/CLK01A PGP? (updated 16 Nov 05) : http://www.clkroot.net/security/nb_root.asc ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: C/C++ call to detect cpu?
On Sunday 22 January 2006 19:53, Derek Ragona wrote: Nicolas, I have commented assembler code for the intel family of CPU's. This code goes back to the i386 and also takes into account the CPU string, and will calculate the clock speed. I do call this as a library function from c/c++ programs. Unfortunately this is written for Microsoft's MASM, and I have never ported it to gas. If you want a copy I can send you the assembler source code and/or the commented listing as well. -Derek Certainly, that would be of great help! Under what license would you be releasing the source ? :) Nicolas. -- FreeBSD 7.0-CURRENT #0: Sat Jan 21 11:33:22 EST 2006 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/CLK01A PGP? (updated 16 Nov 05) : http://www.clkroot.net/security/nb_root.asc pgpilr8wlaw2e.pgp Description: PGP signature
Re: C/C++ call to detect cpu?
Other than 'grep'ing dmesg, is there a way to know the current cpu such as a struct with the machine's cpu and cpu feature (kinda like a time_t struct)? $ sysctl hw.model hw.model: AMD Athlon(tm) 64 Processor 3000+ If you want more details write a tiny assembler routine that does a CPUID instruction and decode the result. Intel has a detailed application note about it at http://developer.intel.ru/design/xeon/applnots/241618.htm R's, John ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: C/C++ call to detect cpu?
On Jan 21, 2006, at 12:33 PM, John Levine wrote: Other than 'grep'ing dmesg, is there a way to know the current cpu such as a struct with the machine's cpu and cpu feature (kinda like a time_t struct)? $ sysctl hw.model hw.model: AMD Athlon(tm) 64 Processor 3000+ If you want more details write a tiny assembler routine that does a CPUID instruction and decode the result. Intel has a detailed application note about it at http://developer.intel.ru/design/xeon/applnots/241618.htm R's, John As for gcc, CFLAGS and CXXFLAGS, doing some searching on google for -march gcc will prove to help you in finding out what is and is not supported by your processor. There's also a link from the Gentoo Linux docs somewhere in the handbook, but you will have to hunt that down on your own ;). There's also a better (or perhaps, just more relevant) doc somewhere on FreeBSD's site about CFLAGS and CXXFLAGS which also addresses gcc variables and architectures I think. -Garrett ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: C/C++ call to detect cpu?
On Jan 21, 2006, at 12:33 PM, John Levine wrote: Other than 'grep'ing dmesg, is there a way to know the current cpu such as a struct with the machine's cpu and cpu feature (kinda like a time_t struct)? $ sysctl hw.model hw.model: AMD Athlon(tm) 64 Processor 3000+ If you want more details write a tiny assembler routine that does a CPUID instruction and decode the result. Intel has a detailed application note about it at http://developer.intel.ru/design/xeon/applnots/241618.htm R's, John Erm. Nevermind. I just misunderstood your question =\... -Garrett ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: C/C++ Editor with auto completion for FreeBSD
On 10/26/05, Lukas Razik [EMAIL PROTECTED] wrote: Does anyone know C/C++ Editors/IDEs for X11 under FreeBSD with auto code completion and for example information boxes about the parameters of functions etc. Emacs can do autocompletion, and you can use etags for finding functions etc. I don't know about information boxes, but there are many extensions available. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: C/C++ interpreter Ch for freebsd
To my fellow geeks and wizards, My dime's worth is that Ch definitely deserves checking out. I've done porting, general development, testing, and more; the one constant I had to do --and I'm pretty sure this holds for all of us-- was cobbling together scripts. Looks like this interpreter can simplify/unify writing shell script. Come in seriously handy for the usual throw-away stuff. Thanks, Gary. Be glad to let you know that we have ported Ch, Ch SDK, Embedded Ch, Ch Control System and SoftIntegration C++ Graphical Library (SIGL) for FreeBSD. Ch can now be freely downloaded from http://www.softintegration.com/download/ Best regards, Xiaodong Xiaodong Zhou, PhD http://www.softintegration.com Ch: a C/C++ interpreter for cross-platform scripting, shell programming, 2D/3D plotting, numerical computing, and embedded scripting. gary On Sat, Mar 13, 2004 at 03:10:45AM -0500, Xiaodong Zhou wrote: On Fri, 12 Mar 2004 04:07:45 -0500 (EST) [EMAIL PROTECTED] (Xiaodong Zhou) wrote: Hello, We have developed a free C/C++ interpreter called Ch. It supports C99 and runs in Windows, Unix, Linux and Mac. We have many freebsd users asking us to port Ch to freebsd. We are in close to finishing porting Ch to freebsd. I wonder if it is possible to have ch bundled with freebsd? More about Ch can be found at http://www.softintegration.com Feel free to me know if you have any questions or suggestions. I've used Ch on windows a log time ago and it's a nice product. If you need any help for making the port, please drop my an email. Thanks so much for your offer. Sure we will keep you in mind. Best regards, Xiaodong Xiaodong Zhou, PhD SoftIntegration, Inc http://www.softintegration.com -- IOnut Unregistered ;) FreeBSD user -- Gary Kline [EMAIL PROTECTED] www.thought.org Public service Unix ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: C/C++ Unix/Programmer/Tester
I'am interesing in becoming BSD tester or alfa tester, how I can get information about job positions in BSD development. FreeBSD is created and developed by volunteers rather than paid staff. To get a job in BSD development, you would have to get a job in a company that is using FreeBSD (or one of the other BSDs) and that, for their own reasons, chooses to have some staff working on BSD things - probably that run on top of BSD. You could also volunteer to do development, but you would not get paid for it from FreeBSD - no one does. To do this, look at the various projects and or the bug (pr) list and do a good job writing the needed code or correction and submit it. If it gets used and you do this often enough you might end up being a committer. As for testing, just download the latest CURRENT and update to the latest with cvsup and you will be running (and thus testing) the latest BSD. Check out information from the FreeBSD web page - follow the appropriate links. jerry Thanks Ricardo Balda ___ ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: C / C++
On 11/11/03 10:15 PM, Alex Kelly sat at the `puter and typed: Whoever mentioned the holy war may have been on to something. ;-) Yup. Been there, done that, got scars to prove it :) -- Louis LeBlanc [EMAIL PROTECTED] Fully Funded Hobbyist, KeySlapper Extrordinaire :) http://www.keyslapper.org ԿԬ Grelb's Reminder: Eighty percent of all people consider themselves to be above average drivers. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: C / C++
On Wed, 12 Nov 2003 02:15 pm, Alex Kelly wrote: Whoever mentioned the holy war may have been on to something. ;-) Except they are all violently agreeing with one another... I'd involke Godwin's Law if it wasn't for Quirk's Exception -- Dr Paul van den Bergen Centre for Advanced Internet Architectures caia.swin.edu.au [EMAIL PROTECTED] IM:bulwynkl2002 And some run up hill and down dale, knapping the chucky stones to pieces wi' hammers, like so many road makers run daft. They say it is to see how the world was made. Sir Walter Scott, St. Ronan's Well 1824 ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
RE: C/C++
FreeBSD can compile C/C++ programs, if you have gcc or gcc-c++ installed respectively. And you can link those programs if you have an appropriate linker installed (binutils). Of course an assembler is also needed (which is installed along with binutils). --- On Fri 09/05, Denis [EMAIL PROTECTED] wrote: From: Denis [mailto: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Date: Fri, 5 Sep 2003 10:43:54 +0400 Subject: Hi All!!!brbr Does FreeBSD support C++ or support C only?brbr-- brBest regards, Denisbr[EMAIL PROTECTED]brbr___br[EMAIL PROTECTED] mailing listbrhttp://lists.freebsd.org/mailman/listinfo/freebsd-questionsbrTo unsubscribe, send any mail to [EMAIL PROTECTED]br ___ Join Excite! - http://www.excite.com The most personalized portal on the Web! ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]