Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 01 Feb 2002 00:13:56 -0800
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Julian Elischer <julian@elischer.org>
Cc:        Daniel Eischen <eischen@pcnet1.pcnet.com>, arch@FreeBSD.ORG
Subject:   FWIW... maybe this way already?
Message-ID:  <3C5A4E44.6380900B@mindspring.com>
References:  <Pine.BSF.4.21.0201312320470.64929-100000@InterJet.elischer.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Linux did what I think is an incredibly clever thing.

They put the current CPU at the beginning of the stack,
and then change it when/if they migrate the process.

Since KSEs have stacks, as well, you could put the
process and thread ID after the CPU ID, there.

Saves weirding out a register to get the CPU, PID, TID,
since the stack base is always known.

FWIW.

-- Terry

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3C5A4E44.6380900B>