修改mq为C++库并固定生产者和消费者

This commit is contained in:
lnk
2026-04-28 11:44:40 +08:00
parent b87da0f454
commit b1d8440e6a
9 changed files with 636 additions and 225 deletions

View File

@@ -224,8 +224,19 @@ extern "C" {
#include <sys/time.h>
#include <sys/resource.h>
#endif
/*
#define max(a,b) (((a) > (b)) ? (a) : (b))
#define min(a,b) (((a) < (b)) ? (a) : (b))
*/
#ifndef __cplusplus
#ifndef max
#define max(a,b) (((a) > (b)) ? (a) : (b))
#endif
#ifndef min
#define min(a,b) (((a) < (b)) ? (a) : (b))
#endif
#endif
#include <stdlib.h>
#include <errno.h>
#include <sys/types.h>