为提高性能,改用c替换原本的flask

This commit is contained in:
2025-09-28 12:02:26 +08:00
parent a0e9bf1b44
commit 3c574e489d
24 changed files with 7240 additions and 0 deletions

27
c/tools/log/log.h Normal file
View File

@ -0,0 +1,27 @@
#ifndef LOG
#define LOG
#include <semaphore.h>
#define MAX_LOG 256
typedef struct logs
{
char log[1024];
struct logs *next;
}logs;
typedef struct log_manager
{
int (*in_log)(logs *,struct log_manager*);
logs* (*out_log)(struct log_manager*);
void *(*clear_log)(void*);
sem_t log_sem;
logs *log;
logs *rear;
int count;
}log_manager;
int init_loger(log_manager *self);
#endif