Fix SCondWait -> SCCondWait typo.

remotes/origin/master-1.0.x
Victor Julien 16 years ago
parent 167c0295af
commit dce323b1f4

@ -481,7 +481,7 @@ uint16_t AppLayerDetectGetProto(AlpProtoDetectCtx *ctx, AlpProtoDetectThreadCtx
p->payload_len = searchlen;
B2gCudaPushPacketTo_tv_CMB2_APC(p);
SCMutexLock(&p->cuda_mutex_q);
SCondWait(&p->cuda_cond_q, &p->cuda_mutex_q);
SCCondWait(&p->cuda_cond_q, &p->cuda_mutex_q);
p->cuda_done = 1;
SCMutexUnlock(&p->cuda_mutex_q);
cnt = p->cuda_matches;

@ -350,7 +350,7 @@ ReceiveErfDag(ThreadVars *tv, Packet *p, void *data, PacketQueue *pq,
SCMutexLock(&packet_q.mutex_q);
packet_q_len = packet_q.len;
if (packet_q.len == 0) {
SCondWait(&packet_q.cond_q, &packet_q.mutex_q);
SCCondWait(&packet_q.cond_q, &packet_q.mutex_q);
}
packet_q_len = packet_q.len;
SCMutexUnlock(&packet_q.mutex_q);

@ -506,7 +506,7 @@ TmEcode ReceiveNFQ(ThreadVars *tv, Packet *p, void *data, PacketQueue *pq, Packe
* for the nfq mutex lock with the verdict thread. */
SCMutexLock(&packet_q.mutex_q);
if (packet_q.len == 0) {
SCondWait(&packet_q.cond_q, &packet_q.mutex_q);
SCCondWait(&packet_q.cond_q, &packet_q.mutex_q);
}
SCMutexUnlock(&packet_q.mutex_q);

@ -165,7 +165,7 @@ TmEcode ReceivePcapFile(ThreadVars *tv, Packet *p, void *data, PacketQueue *pq,
SCMutexLock(&packet_q.mutex_q);
packet_q_len = packet_q.len;
if (packet_q.len == 0) {
SCondWait(&packet_q.cond_q, &packet_q.mutex_q);
SCCondWait(&packet_q.cond_q, &packet_q.mutex_q);
}
packet_q_len = packet_q.len;
SCMutexUnlock(&packet_q.mutex_q);

@ -182,7 +182,7 @@ TmEcode ReceivePcap(ThreadVars *tv, Packet *p, void *data, PacketQueue *pq, Pack
SCMutexLock(&packet_q.mutex_q);
packet_q_len = packet_q.len;
if (packet_q.len == 0) {
SCondWait(&packet_q.cond_q, &packet_q.mutex_q);
SCCondWait(&packet_q.cond_q, &packet_q.mutex_q);
}
packet_q_len = packet_q.len;
SCMutexUnlock(&packet_q.mutex_q);

@ -212,19 +212,19 @@
#define SCCondDestroy pthread_cond_destroy
#ifdef DBG_THREAD
#define SCondWait_dbg(cond, mut) ({ \
#define SCCondWait_dbg(cond, mut) ({ \
int ret = pthread_cond_wait(cond, mut); \
switch (ret) { \
case EINVAL: \
printf("The value specified by attr is invalid (or a SCCondT not initialized!)\n"); \
printf("%16s(%s:%d): (thread:%"PRIuMAX") failed SCondWait %p ret %" PRId32 "\n", __FUNCTION__, __FILE__, __LINE__, (uintmax_t)pthread_self(), mut, retu); \
printf("%16s(%s:%d): (thread:%"PRIuMAX") failed SCCondWait %p ret %" PRId32 "\n", __FUNCTION__, __FILE__, __LINE__, (uintmax_t)pthread_self(), mut, retu); \
break; \
} \
ret; \
})
#define SCondWait SCondWait_dbg
#define SCCondWait SCondWait_dbg
#else
#define SCondWait(cond, mut) pthread_cond_wait(cond, mut)
#define SCCondWait(cond, mut) pthread_cond_wait(cond, mut)
#endif
/** Spinlocks */

@ -70,7 +70,7 @@ Packet *TmqhInputFlow(ThreadVars *tv)
SCMutexLock(&q->mutex_q);
if (q->len == 0) {
/* if we have no packets in queue, wait... */
SCondWait(&q->cond_q, &q->mutex_q);
SCCondWait(&q->cond_q, &q->mutex_q);
}
if (tv->sc_perf_pctx.perf_flag == 1)

@ -54,7 +54,7 @@ Packet *TmqhInputPacketpool(ThreadVars *t)
while (p == NULL) {
p = PacketDequeue(&packet_q);
if (p == NULL) {
SCondWait(&packet_q.cond_q, &packet_q.mutex_q);
SCCondWait(&packet_q.cond_q, &packet_q.mutex_q);
}
}
SCMutexUnlock(&packet_q.mutex_q);

@ -50,7 +50,7 @@ Packet *TmqhInputSimple(ThreadVars *t)
if (q->len == 0) {
/* if we have no packets in queue, wait... */
SCondWait(&q->cond_q, &q->mutex_q);
SCCondWait(&q->cond_q, &q->mutex_q);
}
if (t->sc_perf_pctx.perf_flag == 1)
@ -107,7 +107,7 @@ Packet *TmqhInputSimpleOnQ(PacketQueue *q)
SCMutexLock(&q->mutex_q);
if (q->len == 0) {
/* if we have no packets in queue, wait... */
SCondWait(&q->cond_q, &q->mutex_q);
SCCondWait(&q->cond_q, &q->mutex_q);
}
if (q->len > 0) {

Loading…
Cancel
Save