diff options
author | marcel <marcel@FreeBSD.org> | 2004-04-03 22:23:36 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2004-04-03 22:23:36 +0000 |
commit | 238ada9c745fd1a908039eb3538666a116d96ac0 (patch) | |
tree | e542cb666a666d428c7b35a2dfebba20113026ee /sys/i386/include | |
parent | 094e4edcfab5254c125560ad10b33eda88bb6de6 (diff) | |
download | FreeBSD-src-238ada9c745fd1a908039eb3538666a116d96ac0.zip FreeBSD-src-238ada9c745fd1a908039eb3538666a116d96ac0.tar.gz |
Move the definition of rss() from db_interface.c to cpufunc.h where
it belongs. Change the implementation to match those of rfs() and
rgs() for consistency and irrespective of whether the original was
more correct or not (technically speaking).
Diffstat (limited to 'sys/i386/include')
-rw-r--r-- | sys/i386/include/cpufunc.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/i386/include/cpufunc.h b/sys/i386/include/cpufunc.h index 5b092f0..9fe9df8 100644 --- a/sys/i386/include/cpufunc.h +++ b/sys/i386/include/cpufunc.h @@ -456,6 +456,14 @@ rgs(void) return (sel); } +static __inline u_int +rss(void) +{ + u_int sel; + __asm __volatile("movl %%ss,%0" : "=rm" (sel)); + return (sel); +} + static __inline void load_fs(u_int sel) { |