Updating the IO Ring, Updating the progress printing fn

This commit is contained in:
2026-03-31 19:33:39 +01:00
parent d4ba121b56
commit 41ac164881
13 changed files with 56 additions and 54 deletions

View File

@@ -74,7 +74,7 @@ int main(int argc, char **argv) {
mem_arena *gp_arena = arena_create(&params);
// -------------------------------
// Detect hardware threads
// Detect hardware
// -------------------------------
// --- Windows: detect PHYSICAL cores (not logical threads) ---
size_t hw_threads = platform_physical_cores();
@@ -86,6 +86,8 @@ int main(int argc, char **argv) {
hw_threads);
printf(" Selected instruction set: %s\n", get_xxhash_instruction_set());
// Align IO Ring block size to the system page size
u64 g_ioring_read_block = ALIGN_UP_POW2(IORING_READ_BLOCK, g_pagesize);
// -------------------------------
// Scanning and hashing
// -------------------------------
@@ -127,9 +129,8 @@ int main(int argc, char **argv) {
workers[i].arena = arena_create(&params);
workers[i].file_queue = &file_queue;
if (thread_create(&hash_threads[i], (ThreadFunc)hash_worker_io_ring, &workers[i])
!=
0) {
if (thread_create(&hash_threads[i], (ThreadFunc)hash_worker_io_ring,
&workers[i]) != 0) {
fprintf(stderr, "Failed to create hash thread %zu\n", i);
exit(1);
}