Align some structures to cacheline

Align strucutres with pthread mutex locks to start on cachelines to keep
the lock within one cacheline.
pull/463/merge
Ken Steele 13 years ago committed by Victor Julien
parent d84079ba7d
commit 62540eff3e

@ -56,7 +56,7 @@ typedef struct SCDQDataQueue_ {
SCMutex mutex_q;
SCCondT cond_q;
} SCDQDataQueue;
} __attribute__((aligned(CLS))) SCDQDataQueue;
void SCDQDataEnqueue(SCDQDataQueue *, SCDQGenericQData *);
SCDQGenericQData *SCDQDataDequeue(SCDQDataQueue *);

@ -48,7 +48,7 @@ typedef struct FlowBucket_ {
#else
#error Enable FBLOCK_SPIN or FBLOCK_MUTEX
#endif
} FlowBucket;
} __attribute__((aligned(CLS))) FlowBucket;
#ifdef FBLOCK_SPIN
#define FBLOCK_INIT(fb) SCSpinInit(&(fb)->s, 0)

@ -84,7 +84,7 @@ typedef struct HostHashRow_ {
HRLOCK_TYPE lock;
Host *head;
Host *tail;
} HostHashRow;
} __attribute__((aligned(CLS))) HostHashRow;
/** host hash table */
HostHashRow *host_hash;

Loading…
Cancel
Save