Getting the current thread ID without a syscall?

2013-01-15 Thread Trent Nelson
Howdy, I have an unusual requirement: I need to get the current thread ID in as few instructions as possible. On Windows, I managed to come up with this glorious hack: #ifdef WITH_INTRINSICS # ifdef MS_WINDOWS # include intrin.h # if defined(MS_WIN64) #

Re: Getting the current thread ID without a syscall?

2013-01-15 Thread Trent Nelson
On Tue, Jan 15, 2013 at 01:16:41PM -0800, Konstantin Belousov wrote: On Tue, Jan 15, 2013 at 03:54:03PM -0500, Trent Nelson wrote: Howdy, I have an unusual requirement: I need to get the current thread ID in as few instructions as possible. On Windows, I managed to come up

Re: Getting the current thread ID without a syscall?

2013-01-15 Thread Trent Nelson
On Tue, Jan 15, 2013 at 02:33:41PM -0800, Ian Lepore wrote: On Tue, 2013-01-15 at 14:29 -0800, Alfred Perlstein wrote: On 1/15/13 1:43 PM, Konstantin Belousov wrote: On Tue, Jan 15, 2013 at 04:35:14PM -0500, Trent Nelson wrote: Luckily it's for an open source project (Python), so

Branch prediction

2004-02-16 Thread Trent Nelson
For as long as I've been programming, I've always been under the impression that CPUs will always predict a branch as being false the first time they come across it. Many, many years ago, I came across a DEC programming guide that said the same thing. It suggested using 'do

Re: ACPI throttle doesn't cool CPU

2003-02-16 Thread Trent Nelson
On Sat, Feb 15, 2003 at 11:18:31PM -0800, Sean Hamilton wrote: Greetings, After setting hw.acpi.cpu.performance_speed to 1, a dmesg of acpi_cpu0: set speed to 6.2% and a dog slow system, I am still finding my CPU pumping out heat. It's an AMD 1333 with an A7V board. Is this typical

Re: Some security questions.

2003-02-13 Thread Trent Nelson
[ Re-sending due to earlier failure. ] On Mon, Feb 10, 2003 at 06:03:07PM -0800, Julian Elischer wrote: Our client wants the following 'features' and we'd LIKE to be able to at least say yes we can do that, even if we can also say but we don't think it's a good idea. 1/ Command

Re: compare and contrast vmware and jail ?

2001-11-27 Thread Trent Nelson
work system up to ten minutes quicker than running Linux na- tively on the same machine. Make of that what you will!) Regards, Trent. -- Trent Nelson - Software Engineer - [EMAIL PROTECTED] A man with unlimited enthusiasm can achieve almost

Re: compare and contrast vmware and jail ?

2001-11-27 Thread Trent Nelson
. Kees Jan Trent. -- Trent Nelson - Software Engineer - [EMAIL PROTECTED] A man with unlimited enthusiasm can achieve almost anything. --unknown To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message

Re: Vinum Panic (was Re: HPT370 RAID or Vinum?)

2001-09-16 Thread Trent Nelson
-30MB core, now takes 1s. Regards, Trent. -- Trent Nelson - Software Engineer - [EMAIL PROTECTED] A man with unlimited enthusiasm can achieve almost anything. --unknown To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body

kevent signal handling question.

2001-01-27 Thread Trent Nelson
essentially have kevent() becoming the primary signal handling mechanism in my program? Thanks in advance. Regards, Trent. -- Trent Nelson - Software Engineer - [EMAIL PROTECTED] "A man with unlimited enthusiasm can achieve almost anything." --unknown To U

Network I/O multiplexing questions.

2001-01-17 Thread Trent Nelson
the State-Threads API proposed by SGI? Has anyone considered adding support for our kevent/kqueue multi- plexing method in addition to the select/poll methods offered? (http://oss.sgi.com/projects/state-threads/) Thanks in advance. Regards, Trent. -- Trent Nelson

Re: dir-listing bug in linux-emulation

2000-10-26 Thread Trent Nelson
David van Deijk wrote: Dear hackers. When I was running an linux program (soffice) i needed something of my dos-partition. Then i stumbled onto something I would call a "major" bug. I went to /dos/c (my first partition ) but saw only 6 files and 1 dir. So i went for some exploring

Conflicting C/H/S values

2000-10-22 Thread Trent Nelson
Could someone explain to me why the following HDD BIOS Geometries don't represent the values proposed by the drives. What am I missing? (snippets from boot -v) BIOS Geometries: 0:030c7f3f 0..780=781 cylinders, 0..127=128 heads, 1..63=63 sectors 1:03fefe3f 0..1022=1023

Re: Linux NVIDIA drivers vs. default XFree86 drivers (WAS: RE: Video card support)

2000-07-30 Thread Trent Nelson
Garrett Rooney wrote: On Sun, 30 Jul 2000, Trent Nelson wrote: So, given a working FreeBSD-specific kernel device driver - can the Linux OpenGL driver/libraries provided be handled via linux.ko? i believe the general answer is a definative maybe. but honestly, do you really

Linux NVIDIA drivers vs. default XFree86 drivers (WAS: RE: Video card support)

2000-07-29 Thread Trent Nelson
Moving to hackers@, where most discussions regarding the NVIDIA drivers seem to take place lately. Chris BeHanna wrote: I don't remember if it was this list on which I saw this discussion, or if it was hackers. Anyway, I looked at xfree86.org today, and noticed that there is

Re: Linux NVIDIA drivers vs. default XFree86 drivers (WAS: RE: Video card support)

2000-07-29 Thread Trent Nelson
Peter Wemm wrote: They provide the OS interface glue to enable interfacing with the kernel. The driver then completely takes over the card management in kernel context - busmaster DMA, command fifo managenent, card memory management, the lot. So, given a working FreeBSD-specific

Re: mmap syncs and file extends

2000-07-27 Thread Trent Nelson
Dimitar Peikov wrote: Hi, hackers, I've try to use mmap() and resize the mapping. msync() syncronizes only the memory that was mmapped with mmap(). How can I extend the main file? Memory is filled correctly, but I must write extended data to file by hand. You need to extend

Re: NVIDIA Drivers for XF4

2000-06-14 Thread Trent Nelson
Brandon Fosdick wrote: Does anybody have the new nvidia drivers working yet? Aparently I'm not as smart as I thought. :) From what I've been told - FreeBSD's kernel is unable to run Linux's kernel modules. Hence, the source provided by nVIDIA for the kernel module needs to be ported

Erroneous mmap() behaviour?

2000-05-27 Thread Trent Nelson
Can someone explain to me why mmap() returns an address map you're prohibited from accessing if the fd argument represents a file that has just been created? I have a function that calls the following, where name represents a file that, if it exists, is intended to get

Vinum/SoftUpdates query.

1999-09-29 Thread Trent Nelson
Hi, I was planning on sending this to FreeBSD-newbies@, but due to the nature of the question, decided against it and sent it here. I currently have a 3.2GB Quantum HDD as my primary master, and an 8.4GB Quantum HDD as my primary slave. What I want to do is create an exact image