summaryrefslogtreecommitdiff
path: root/src/core/ngx_cpuinfo.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2009-05-18 16:31:31 +0000
committerJonathan Kolb <jon@b0g.us>2009-05-18 16:31:31 +0000
commit1b271801c3e9b1464a24c2ab3e104b7b2fb530a6 (patch)
treee423ec50dc241033b07fd1954f3c6aea1681bc3c /src/core/ngx_cpuinfo.c
parent5e44792c14ec6bf5b0ea68717d754ba0105ae529 (diff)
downloadnginx-0.6.37.tar.gz
Changes with nginx 0.6.37 18 May 2009v0.6.37
*) Feature: Microsoft specific "AUTH LOGIN with User Name" mode support in mail proxy server. Thanks to Maxim Dounin. *) Bugfix: nginx could not be built on platforms different from i386, amd64, sparc, and ppc; the bug had appeared in 0.6.36.
Diffstat (limited to 'src/core/ngx_cpuinfo.c')
-rw-r--r--src/core/ngx_cpuinfo.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core/ngx_cpuinfo.c b/src/core/ngx_cpuinfo.c
index 68eb094c9..39a6b05a0 100644
--- a/src/core/ngx_cpuinfo.c
+++ b/src/core/ngx_cpuinfo.c
@@ -72,7 +72,7 @@ void
ngx_cpuinfo(void)
{
u_char *vendor;
- uint32_t vbuf[5], cpu[4];
+ uint32_t vbuf[5], cpu[4], model;
vbuf[0] = 0;
vbuf[1] = 0;
@@ -103,8 +103,10 @@ ngx_cpuinfo(void)
case 6:
ngx_cacheline_size = 32;
- if ((cpu[0] & 0xf0) >= 0xd0) {
- /* Intel Core */
+ model = ((cpu[0] & 0xf0000) >> 8) | (cpu[0] & 0xf0);
+
+ if (model >= 0xd0) {
+ /* Intel Core, Core 2, Atom */
ngx_cacheline_size = 64;
}