diff --git a/mongoose.h b/mongoose.h index 71773939..913b9e48 100644 --- a/mongoose.h +++ b/mongoose.h @@ -833,19 +833,7 @@ char *mg_remove_double_dots(char *s); // Single producer, single consumer non-blocking queue -// -// Producer: -// char *buf; -// while (mg_queue_book(q, &buf) < len) WAIT(); // Wait for space -// memcpy(buf, my_data, len); // Copy data to the queue -// mg_queue_add(q, len); -// -// Consumer: -// char *buf; -// while ((len = mg_queue_get(q, &buf)) == 0) WAIT(); -// mg_hexdump(buf, len); // Handle message -// mg_queue_del(q, len); -// + struct mg_queue { char *buf; size_t size; diff --git a/src/queue.h b/src/queue.h index ff37d6d4..c9ba18cc 100644 --- a/src/queue.h +++ b/src/queue.h @@ -3,19 +3,7 @@ #include "arch.h" // For size_t // Single producer, single consumer non-blocking queue -// -// Producer: -// char *buf; -// while (mg_queue_book(q, &buf) < len) WAIT(); // Wait for space -// memcpy(buf, my_data, len); // Copy data to the queue -// mg_queue_add(q, len); -// -// Consumer: -// char *buf; -// while ((len = mg_queue_get(q, &buf)) == 0) WAIT(); -// mg_hexdump(buf, len); // Handle message -// mg_queue_del(q, len); -// + struct mg_queue { char *buf; size_t size;