change queues, run exec speed optimizations
This commit is contained in:
@@ -2,10 +2,12 @@
|
||||
#define __CONTEXT_H__
|
||||
|
||||
#include <pthread.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "ptQueue/inc/ptQueue.h"
|
||||
#include "ptQueue/inc/spsc.h"
|
||||
#include "wsServer/include/ws.h"
|
||||
#include "ptQueue/inc/mpsc.h"
|
||||
|
||||
#include "linkedlist.h"
|
||||
#include "sized_ptr.h"
|
||||
@@ -16,8 +18,8 @@
|
||||
typedef struct {
|
||||
SizedPtr* bufs;
|
||||
uint8_t buffersCount;
|
||||
_Atomic (uint8_t) readRequestIdx;
|
||||
_Atomic (uint8_t) currWritingIdx;
|
||||
CACHE_ALIGN _Atomic (uint8_t) readRequestIdx;
|
||||
CACHE_ALIGN _Atomic (uint8_t) currWritingIdx;
|
||||
} OutgoingBuffers;
|
||||
|
||||
|
||||
@@ -43,12 +45,15 @@ typedef struct {
|
||||
// Cached DeviceIdMappingNotif broadcast message (sent to newly authed clients)
|
||||
uint8_t* deviceIdMappingMsg;
|
||||
size_t deviceIdMappingMsgLen;
|
||||
queue_mpsc_t* inMsgQueue;
|
||||
queue_spsc_t* outMsgQueue;
|
||||
} EmulContext;
|
||||
|
||||
|
||||
typedef struct {
|
||||
pthread_mutex_t registerMutex;
|
||||
ptQueue* regQueue;
|
||||
queue_spsc_t* regQueue;
|
||||
queue_mpsc_t* inMsgQueue;
|
||||
uint8_t* accessToken;
|
||||
EmulContext* emulContext;
|
||||
} ServerContext;
|
||||
|
||||
Reference in New Issue
Block a user