diff options
author | bde <bde@FreeBSD.org> | 2002-01-17 17:49:23 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 2002-01-17 17:49:23 +0000 |
commit | 73ef84f92b1f279c412d03b42c5a5239ffbdfcb2 (patch) | |
tree | 2100d26b7e6ca16285349cbf6a1a72c315a1cb67 /sys/i386 | |
parent | babe0aff74bcbfecba512507069d08d63d02bbbc (diff) | |
download | FreeBSD-src-73ef84f92b1f279c412d03b42c5a5239ffbdfcb2.zip FreeBSD-src-73ef84f92b1f279c412d03b42c5a5239ffbdfcb2.tar.gz |
Changed the type of pcb_flags from u_char to u_int and adjusted things.
This removes the only atomic operation on a char type in the entire
kernel.
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/i386/swtch.s | 8 | ||||
-rw-r--r-- | sys/i386/include/pcb.h | 2 |
2 files changed, 4 insertions, 6 deletions
diff --git a/sys/i386/i386/swtch.s b/sys/i386/i386/swtch.s index ae967c4..230c2fd 100644 --- a/sys/i386/i386/swtch.s +++ b/sys/i386/i386/swtch.s @@ -98,8 +98,7 @@ ENTRY(cpu_switch) movl %gs,PCB_GS(%edx) /* Test if debug registers should be saved. */ - movb PCB_FLAGS(%edx),%al - andb $PCB_DBREGS,%al + testl $PCB_DBREGS,PCB_FLAGS(%edx) jz 1f /* no, skip over */ movl %dr7,%eax /* yes, do the save */ movl %eax,PCB_DR7(%edx) @@ -271,9 +270,8 @@ sw1b: cpu_switch_load_gs: movl PCB_GS(%edx),%gs - /* Test if debug regisers should be restored. */ - movb PCB_FLAGS(%edx),%al - andb $PCB_DBREGS,%al + /* Test if debug registers should be restored. */ + testl $PCB_DBREGS,PCB_FLAGS(%edx) jz 1f /* diff --git a/sys/i386/include/pcb.h b/sys/i386/include/pcb.h index 9eb0f81..d4a375a 100644 --- a/sys/i386/include/pcb.h +++ b/sys/i386/include/pcb.h @@ -62,7 +62,7 @@ struct pcb { int pcb_dr7; union savefpu pcb_save; - u_char pcb_flags; + u_int pcb_flags; #define FP_SOFTFP 0x01 /* process using software fltng pnt emulator */ #define PCB_DBREGS 0x02 /* process using debug registers */ #define PCB_NPXTRAP 0x04 /* npx trap pending */ |