| line |
true |
false |
branch |
|
28
|
0 |
18 |
if (!SvROK(self)) return; |
|
30
|
0 |
18 |
if (!h) return; |
|
38
|
9 |
0 |
EXTRACT_RING(self); |
|
|
0 |
9 |
EXTRACT_RING(self); |
|
|
0 |
9 |
EXTRACT_RING(self); |
|
48
|
3 |
0 |
EXTRACT_RING(self); |
|
|
0 |
3 |
EXTRACT_RING(self); |
|
|
0 |
3 |
EXTRACT_RING(self); |
|
50
|
0 |
3 |
RETVAL = (UV)h->hdr->capacity; |
|
58
|
1 |
0 |
EXTRACT_RING(self); |
|
|
0 |
1 |
EXTRACT_RING(self); |
|
|
0 |
1 |
EXTRACT_RING(self); |
|
68
|
4 |
0 |
EXTRACT_RING(self); |
|
|
0 |
4 |
EXTRACT_RING(self); |
|
|
0 |
4 |
EXTRACT_RING(self); |
|
70
|
0 |
4 |
RETVAL = (UV)__atomic_load_n(&h->hdr->count, __ATOMIC_ACQUIRE); |
|
79
|
2 |
0 |
EXTRACT_RING(self); |
|
|
0 |
2 |
EXTRACT_RING(self); |
|
|
0 |
2 |
EXTRACT_RING(self); |
|
82
|
2 |
0 |
if (items > 2) timeout = SvNV(ST(2)); |
|
83
|
1 |
1 |
RETVAL = ring_wait(h, expected_count, timeout); |
|
91
|
1 |
0 |
EXTRACT_RING(self); |
|
|
0 |
1 |
EXTRACT_RING(self); |
|
|
0 |
1 |
EXTRACT_RING(self); |
|
99
|
1 |
0 |
EXTRACT_RING(self); |
|
|
0 |
1 |
EXTRACT_RING(self); |
|
|
0 |
1 |
EXTRACT_RING(self); |
|
101
|
1 |
0 |
RETVAL = h->path ? newSVpv(h->path, 0) : &PL_sv_undef; |
|
109
|
1 |
0 |
EXTRACT_RING(self); |
|
|
0 |
1 |
EXTRACT_RING(self); |
|
|
0 |
1 |
EXTRACT_RING(self); |
|
111
|
0 |
1 |
RETVAL = h->backing_fd; |
|
119
|
2 |
0 |
EXTRACT_RING(self); |
|
|
0 |
2 |
EXTRACT_RING(self); |
|
|
0 |
2 |
EXTRACT_RING(self); |
|
122
|
0 |
2 |
if (RETVAL < 0) croak("eventfd: %s", strerror(errno)); |
|
131
|
3 |
0 |
EXTRACT_RING(self); |
|
|
0 |
3 |
EXTRACT_RING(self); |
|
|
0 |
3 |
EXTRACT_RING(self); |
|
133
|
3 |
0 |
if (h->notify_fd >= 0 && h->notify_fd != fd) close(h->notify_fd); |
|
|
2 |
1 |
if (h->notify_fd >= 0 && h->notify_fd != fd) close(h->notify_fd); |
|
140
|
3 |
0 |
EXTRACT_RING(self); |
|
|
0 |
3 |
EXTRACT_RING(self); |
|
|
0 |
3 |
EXTRACT_RING(self); |
|
142
|
0 |
3 |
RETVAL = h->notify_fd; |
|
150
|
2 |
0 |
EXTRACT_RING(self); |
|
|
0 |
2 |
EXTRACT_RING(self); |
|
|
0 |
2 |
EXTRACT_RING(self); |
|
152
|
2 |
0 |
RETVAL = ring_notify(h); |
|
160
|
2 |
0 |
EXTRACT_RING(self); |
|
|
0 |
2 |
EXTRACT_RING(self); |
|
|
0 |
2 |
EXTRACT_RING(self); |
|
163
|
2 |
0 |
RETVAL = (v >= 0) ? newSViv((IV)v) : &PL_sv_undef; |
|
171
|
1 |
0 |
EXTRACT_RING(self); |
|
|
0 |
1 |
EXTRACT_RING(self); |
|
|
0 |
1 |
EXTRACT_RING(self); |
|
173
|
0 |
1 |
if (ring_msync(h) != 0) croak("msync: %s", strerror(errno)); |
|
180
|
1 |
0 |
if (sv_isobject(self_or_class)) { |
|
182
|
0 |
1 |
if (!h) croak("Attempted to use a destroyed object"); |
|
185
|
0 |
0 |
if (items < 2) croak("Usage: ...->unlink($path)"); |
|
188
|
0 |
1 |
if (!p) croak("cannot unlink anonymous or memfd object"); |
|
189
|
0 |
1 |
if (unlink(p) != 0) croak("unlink(%s): %s", p, strerror(errno)); |
|
195
|
3 |
0 |
EXTRACT_RING(self); |
|
|
0 |
3 |
EXTRACT_RING(self); |
|
|
0 |
3 |
EXTRACT_RING(self); |
|
223
|
3 |
5 |
const char *p = SvOK(path) ? SvPV_nolen(path) : NULL; |
|
225
|
0 |
8 |
if (!h) croak("Data::RingBuffer::Shared::Int->new: %s", errbuf); |
|
239
|
0 |
6 |
if (!h) croak("Data::RingBuffer::Shared::Int->new_memfd: %s", errbuf); |
|
252
|
0 |
1 |
if (!h) croak("Data::RingBuffer::Shared::Int->new_from_fd: %s", errbuf); |
|
262
|
100 |
0 |
EXTRACT_RING(self); |
|
|
0 |
100 |
EXTRACT_RING(self); |
|
|
0 |
100 |
EXTRACT_RING(self); |
|
273
|
44 |
0 |
EXTRACT_RING(self); |
|
|
0 |
44 |
EXTRACT_RING(self); |
|
|
0 |
44 |
EXTRACT_RING(self); |
|
275
|
33 |
11 |
uint32_t n = (items > 1) ? (uint32_t)SvUV(ST(1)) : 0; |
|
277
|
42 |
2 |
RETVAL = ring_read_latest(h, n, &v) ? newSViv((IV)v) : &PL_sv_undef; |
|
286
|
5 |
0 |
EXTRACT_RING(self); |
|
|
0 |
5 |
EXTRACT_RING(self); |
|
|
0 |
5 |
EXTRACT_RING(self); |
|
289
|
3 |
2 |
RETVAL = ring_read_seq(h, seq, &v) ? newSViv((IV)v) : &PL_sv_undef; |
|
306
|
0 |
2 |
const char *p = SvOK(path) ? SvPV_nolen(path) : NULL; |
|
308
|
0 |
2 |
if (!h) croak("Data::RingBuffer::Shared::F64->new: %s", errbuf); |
|
322
|
0 |
1 |
if (!h) croak("Data::RingBuffer::Shared::F64->new_memfd: %s", errbuf); |
|
335
|
0 |
0 |
if (!h) croak("Data::RingBuffer::Shared::F64->new_from_fd: %s", errbuf); |
|
345
|
8 |
0 |
EXTRACT_RING(self); |
|
|
0 |
8 |
EXTRACT_RING(self); |
|
|
0 |
8 |
EXTRACT_RING(self); |
|
356
|
12 |
0 |
EXTRACT_RING(self); |
|
|
0 |
12 |
EXTRACT_RING(self); |
|
|
0 |
12 |
EXTRACT_RING(self); |
|
358
|
10 |
2 |
uint32_t n = (items > 1) ? (uint32_t)SvUV(ST(1)) : 0; |
|
360
|
12 |
0 |
RETVAL = ring_read_latest(h, n, &v) ? newSVnv(v) : &PL_sv_undef; |
|
369
|
0 |
0 |
EXTRACT_RING(self); |
|
|
0 |
0 |
EXTRACT_RING(self); |
|
|
0 |
0 |
EXTRACT_RING(self); |
|
372
|
0 |
0 |
RETVAL = ring_read_seq(h, seq, &v) ? newSVnv(v) : &PL_sv_undef; |