* syscalls.cc (gethostid): Set thread affinity so that results are predictable.
This commit is contained in:
parent
e2723b750a
commit
b671715358
|
@ -1,3 +1,8 @@
|
||||||
|
2003-07-06 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
|
* syscalls.cc (gethostid): Set thread affinity so that results are
|
||||||
|
predictable.
|
||||||
|
|
||||||
2003-07-05 Corinna Vinschen <corinna@vinschen.de>
|
2003-07-05 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* mmap.cc (list::match): Add parameters to return valid address and
|
* mmap.cc (list::match): Add parameters to return valid address and
|
||||||
|
@ -190,9 +195,9 @@
|
||||||
|
|
||||||
2003-06-18 Pierre Humblet <pierre.humblet@ieee.org>
|
2003-06-18 Pierre Humblet <pierre.humblet@ieee.org>
|
||||||
|
|
||||||
* autoload.cc (GetNetworkParams): Add.
|
* autoload.cc (GetNetworkParams): Add.
|
||||||
* net.cc (getdomainname): Call GetNetworkParams and read the
|
* net.cc (getdomainname): Call GetNetworkParams and read the
|
||||||
DhcpDomain registry value if warranted.
|
DhcpDomain registry value if warranted.
|
||||||
|
|
||||||
2003-06-17 Christopher Faylor <cgf@redhat.com>
|
2003-06-17 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
|
|
|
@ -2787,6 +2787,11 @@ long gethostid(void)
|
||||||
0x00290012};
|
0x00290012};
|
||||||
|
|
||||||
bool has_cpuid = false;
|
bool has_cpuid = false;
|
||||||
|
sigframe thisframe (mainthread);
|
||||||
|
|
||||||
|
DWORD opmask = SetThreadAffinityMask (GetCurrentThread (), 1);
|
||||||
|
if (!opmask)
|
||||||
|
debug_printf ("SetThreadAffinityMask to 1 failed, %E");
|
||||||
|
|
||||||
if (!can_set_flag (0x00040000))
|
if (!can_set_flag (0x00040000))
|
||||||
debug_printf ("386 processor - no cpuid");
|
debug_printf ("386 processor - no cpuid");
|
||||||
|
@ -2870,6 +2875,9 @@ long gethostid(void)
|
||||||
for (int i=0;i<13;i++)
|
for (int i=0;i<13;i++)
|
||||||
hostid ^= ((data[i] << (i << 2)) | (data[i] >> (32 - (i << 2))));
|
hostid ^= ((data[i] << (i << 2)) | (data[i] >> (32 - (i << 2))));
|
||||||
|
|
||||||
|
if (opmask && !SetThreadAffinityMask (GetCurrentThread (), opmask))
|
||||||
|
debug_printf ("SetThreadAffinityMask to %p failed, %E", opmask);
|
||||||
|
|
||||||
debug_printf ("hostid: %08x", hostid);
|
debug_printf ("hostid: %08x", hostid);
|
||||||
|
|
||||||
return hostid;
|
return hostid;
|
||||||
|
|
Loading…
Reference in New Issue