mirror of
https://github.com/cesanta/mongoose.git
synced 2025-08-06 13:37:34 +08:00
Merge pull request #2199 from cesanta/docinsource
remove stalled doc in header
This commit is contained in:
commit
7e7d0bb354
14
mongoose.h
14
mongoose.h
@ -833,19 +833,7 @@ char *mg_remove_double_dots(char *s);
|
|||||||
|
|
||||||
|
|
||||||
// Single producer, single consumer non-blocking queue
|
// 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 {
|
struct mg_queue {
|
||||||
char *buf;
|
char *buf;
|
||||||
size_t size;
|
size_t size;
|
||||||
|
14
src/queue.h
14
src/queue.h
@ -3,19 +3,7 @@
|
|||||||
#include "arch.h" // For size_t
|
#include "arch.h" // For size_t
|
||||||
|
|
||||||
// Single producer, single consumer non-blocking queue
|
// 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 {
|
struct mg_queue {
|
||||||
char *buf;
|
char *buf;
|
||||||
size_t size;
|
size_t size;
|
||||||
|
Loading…
Reference in New Issue
Block a user