fix typo and remove commented code

This commit is contained in:
2024-03-27 00:10:28 +01:00
parent de1b2b9db3
commit 9814ceda72
+1 -5
View File
@@ -57,7 +57,7 @@ release_push_location(struct lock_free_queue *q, uint64_t index)
// after the queue's tail. // after the queue's tail.
// //
// It may be possible that other threads // It may be possible that other threads
// inserted items before this one, buf still // inserted items before this one, but still
// after the tail // after the tail
// //
// Before being able to move the tail over // Before being able to move the tail over
@@ -78,8 +78,6 @@ lock_free_queue_try_push(struct lock_free_queue *q, void *src)
void *dst = item_addr(q, index); void *dst = item_addr(q, index);
memcpy(dst, src, q->cell); memcpy(dst, src, q->cell);
//kind_of_atomic_fprintf(stdout, "push at %d\n", index % q->size);
release_push_location(q, index); release_push_location(q, index);
return true; return true;
} }
@@ -132,8 +130,6 @@ lock_free_queue_try_pop(struct lock_free_queue *q, void *dst)
void *src = item_addr(q, index); void *src = item_addr(q, index);
memcpy(dst, src, q->cell); memcpy(dst, src, q->cell);
//kind_of_atomic_fprintf(stdout, "pop at %d\n", index % q->size);
release_pop_location(q, index); release_pop_location(q, index);
return true; return true;
} }