fstat(fd, &statbuf);
*mapping = statbuf.st_size;
*baseAddress = mmap(nullptr, statbuf.st_size, PROT_READ, MAP_SHARED, fd, 0);
fstat(fd, &statbuf);
*mapping = statbuf.st_size;
*baseAddress = mmap(nullptr, statbuf.st_size, PROT_READ, MAP_SHARED, fd, 0);
HANDLE fd = CreateFile(fname.c_str(), GENERIC_READ, FILE_SHARE_READ, nullptr,
HANDLE fd = CreateFile(fname.c_str(), GENERIC_READ, FILE_SHARE_READ, nullptr,
if (fd == INVALID_HANDLE_VALUE)
return *baseAddress = nullptr, nullptr;
if (fd == INVALID_HANDLE_VALUE)
return *baseAddress = nullptr, nullptr;
- // Use 'aquire' to avoid a thread reads 'ready' == true while another is
- // still working, this could happen due to compiler reordering.
+ // Use 'acquire' to avoid a thread reading 'ready' == true while
+ // another is still working. (compiler reordering may cause this).
continue; // First on diagonal, second above
else if (!off_A1H8(s1) && !off_A1H8(s2))
continue; // First on diagonal, second above
else if (!off_A1H8(s1) && !off_A1H8(s2))