comparison src/core/ngx_cpuinfo.c @ 386:1878e9c00f22 NGINX_0_6_37

nginx 0.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.
author Igor Sysoev <http://sysoev.ru>
date Mon, 18 May 2009 00:00:00 +0400
parents a39aab45a53f
children
comparison
equal deleted inserted replaced
385:842321c9fc84 386:1878e9c00f22
70 70
71 void 71 void
72 ngx_cpuinfo(void) 72 ngx_cpuinfo(void)
73 { 73 {
74 u_char *vendor; 74 u_char *vendor;
75 uint32_t vbuf[5], cpu[4]; 75 uint32_t vbuf[5], cpu[4], model;
76 76
77 vbuf[0] = 0; 77 vbuf[0] = 0;
78 vbuf[1] = 0; 78 vbuf[1] = 0;
79 vbuf[2] = 0; 79 vbuf[2] = 0;
80 vbuf[3] = 0; 80 vbuf[3] = 0;
101 101
102 /* Pentium Pro, II, III */ 102 /* Pentium Pro, II, III */
103 case 6: 103 case 6:
104 ngx_cacheline_size = 32; 104 ngx_cacheline_size = 32;
105 105
106 if ((cpu[0] & 0xf0) >= 0xd0) { 106 model = ((cpu[0] & 0xf0000) >> 8) | (cpu[0] & 0xf0);
107 /* Intel Core */ 107
108 if (model >= 0xd0) {
109 /* Intel Core, Core 2, Atom */
108 ngx_cacheline_size = 64; 110 ngx_cacheline_size = 64;
109 } 111 }
110 112
111 break; 113 break;
112 114