[misc] make the affinity setup fn more generic and move it to stdfn

* Also align checksum context to 64 bytes (cache line)
This commit is contained in:
Pete Batard 2016-03-03 17:24:54 +00:00
parent 0313e5ca54
commit d385a097c0
5 changed files with 46 additions and 47 deletions

View file

@ -441,7 +441,7 @@ extern LONG ValidateSignature(HWND hDlg, const char* path);
extern BOOL IsFontAvailable(const char* font_name);
extern BOOL WriteFileWithRetry(HANDLE hFile, LPCVOID lpBuffer, DWORD nNumberOfBytesToWrite,
LPDWORD lpNumberOfBytesWritten, DWORD nNumRetries);
extern BOOL SetChecksumAffinity(DWORD_PTR* thread_affinity);
extern BOOL SetThreadAffinity(DWORD_PTR* thread_affinity, size_t num_threads);
#define printbits(x) _printbits(sizeof(x), &x, 0)
#define printbitslz(x) _printbits(sizeof(x), &x, 1)
extern char* _printbits(size_t const size, void const * const ptr, int leading_zeroes);