Jason Ish
796dd5223b
tests: no longer necessary to provide successful return code
...
1 pass, 0 is fail.
9 years ago
Ken Steele
8f1d75039a
Enforce function coding standard
...
Functions should be defined as:
int foo(void)
{
}
Rather than:
int food(void) {
}
All functions where changed by a script to match this standard.
11 years ago
Eric Leblond
e176be6fcc
Use unlikely for error treatment.
...
When handling error case on SCMallog, SCCalloc or SCStrdup
we are in an unlikely case. This patch adds the unlikely()
expression to indicate this to gcc.
This patch has been obtained via coccinelle. The transformation
is the following:
@istested@
identifier x;
statement S1;
identifier func =~ "(SCMalloc|SCStrdup|SCCalloc)";
@@
x = func(...)
... when != x
- if (x == NULL) S1
+ if (unlikely(x == NULL)) S1
13 years ago
Eric Leblond
0227a87fcb
cleaning: fix warning when building with clang.
...
clang was issuing some warnings related to unused return in function.
This patch adds some needed error treatment and ignore the rest of the
warnings by adding a cast to void.
13 years ago
Victor Julien
8cdd02877f
Add unittests for ringbuffer.
15 years ago
Victor Julien
6eb7eea705
Fix a data race for packet pool packets when defrag/tunnel code needs a packet.
15 years ago
Victor Julien
6519a86ec7
Move packet pool to ringbuffer, update packet pool api and ringbuffer api. Remove memset usage from PACKET_RECYCLE, add proper cleanup macros.
15 years ago
Victor Julien
cb2fef8680
In the ringbuffers spin before the wait
15 years ago
Victor Julien
c7a744c937
Split ringbuffer queue handler into multiple, for mrsw, srsw, srmw modes.
15 years ago
Victor Julien
1ad289dfff
Add thread cond_t based waiting in the ringbuffer.
15 years ago
Victor Julien
167c0295af
Merge different ringbuffer structures.
15 years ago
Victor Julien
3a8c0d2cfe
Fix ringbuffer number wrap around issue causing buffer items getting overwritten and thus lost.
15 years ago
Victor Julien
0140a14a15
Introduce atomic operations API that supports GCC's atomic operations and a fallback using (spin)locks. Convert ringbuffer api to use the new atomic api.
15 years ago
Victor Julien
2fe77bf65e
Use ringbuffers in the pcap live auto runmode as well.
15 years ago
Victor Julien
53acf08996
Add multi packet reading for pcap live mode. Add a partly lock free multi writer, multi reader ringbuffer.
15 years ago
Victor Julien
6f502f0da5
lockfree ringbuffer wip2, including proper shutdown.
15 years ago
Victor Julien
a48a767efc
Lockfree ringbuffer wip.
15 years ago