Branch Coverage

Shared.xs
Criterion Covered Total %
branch 614 1380 44.4


line true false branch
121 0 66 mode_t fmode = (items > 3 && (SvGETMAGIC(ST(3)), SvOK(ST(3)))) ? (mode_t)SvUV(ST(3)) : 0600;
0 0 mode_t fmode = (items > 3 && (SvGETMAGIC(ST(3)), SvOK(ST(3)))) ? (mode_t)SvUV(ST(3)) : 0600;
0 0 mode_t fmode = (items > 3 && (SvGETMAGIC(ST(3)), SvOK(ST(3)))) ? (mode_t)SvUV(ST(3)) : 0600;
0 0 mode_t fmode = (items > 3 && (SvGETMAGIC(ST(3)), SvOK(ST(3)))) ? (mode_t)SvUV(ST(3)) : 0600;
122 0 66 const char *p = (SvGETMAGIC(path), SvOK(path)) ? SvPV_nolen(path) : NULL;
0 0 const char *p = (SvGETMAGIC(path), SvOK(path)) ? SvPV_nolen(path) : NULL;
33 33 const char *p = (SvGETMAGIC(path), SvOK(path)) ? SvPV_nolen(path) : NULL;
124 1 65 if (!h) croak("Data::PubSub::Shared::Int->new: %s", errbuf);
138 0 1 if (!h) croak("Data::PubSub::Shared::Int->new_memfd: %s", errbuf);
151 0 1 if (!h) croak("Data::PubSub::Shared::Int->new_from_fd: %s", errbuf);
160 1 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int", self);
0 1 EXTRACT_HANDLE("Data::PubSub::Shared::Int", self);
0 1 EXTRACT_HANDLE("Data::PubSub::Shared::Int", self);
162 0 1 RETVAL = h->backing_fd;
170 0 67 if (!SvROK(self)) return;
172 0 67 if (!h) return;
181 468 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int", self);
0 468 EXTRACT_HANDLE("Data::PubSub::Shared::Int", self);
0 468 EXTRACT_HANDLE("Data::PubSub::Shared::Int", self);
183 468 0 RETVAL = pubsub_int_publish(h, (int64_t)value);
191 5 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int", self);
0 5 EXTRACT_HANDLE("Data::PubSub::Shared::Int", self);
0 5 EXTRACT_HANDLE("Data::PubSub::Shared::Int", self);
194 1 4 if (count == 0) { RETVAL = 0; }
196 0 4 if (count > 8192) croak("publish_multi: too many values (%u > 8192)", count);
198 208 4 for (uint32_t i = 0; i < count; i++)
210 1 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int", self);
0 1 EXTRACT_HANDLE("Data::PubSub::Shared::Int", self);
0 1 EXTRACT_HANDLE("Data::PubSub::Shared::Int", self);
219 21 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int", self);
0 21 EXTRACT_HANDLE("Data::PubSub::Shared::Int", self);
0 21 EXTRACT_HANDLE("Data::PubSub::Shared::Int", self);
222 0 21 if (!sub) croak("subscribe: out of memory");
232 26 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int", self);
0 26 EXTRACT_HANDLE("Data::PubSub::Shared::Int", self);
0 26 EXTRACT_HANDLE("Data::PubSub::Shared::Int", self);
235 0 26 if (!sub) croak("subscribe_all: out of memory");
245 1 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int", self);
0 1 EXTRACT_HANDLE("Data::PubSub::Shared::Int", self);
0 1 EXTRACT_HANDLE("Data::PubSub::Shared::Int", self);
247 0 1 RETVAL = h->capacity;
255 13 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int", self);
0 13 EXTRACT_HANDLE("Data::PubSub::Shared::Int", self);
0 13 EXTRACT_HANDLE("Data::PubSub::Shared::Int", self);
257 0 13 RETVAL = (UV)__atomic_load_n(&h->hdr->write_pos, __ATOMIC_RELAXED);
265 2 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int", self);
0 2 EXTRACT_HANDLE("Data::PubSub::Shared::Int", self);
0 2 EXTRACT_HANDLE("Data::PubSub::Shared::Int", self);
267 1 1 RETVAL = h->path ? newSVpv(h->path, 0) : &PL_sv_undef;
275 5 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int", self);
0 5 EXTRACT_HANDLE("Data::PubSub::Shared::Int", self);
0 5 EXTRACT_HANDLE("Data::PubSub::Shared::Int", self);
297 4 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int", self);
0 4 EXTRACT_HANDLE("Data::PubSub::Shared::Int", self);
0 4 EXTRACT_HANDLE("Data::PubSub::Shared::Int", self);
305 4 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int", self);
0 4 EXTRACT_HANDLE("Data::PubSub::Shared::Int", self);
0 4 EXTRACT_HANDLE("Data::PubSub::Shared::Int", self);
307 0 4 if (pubsub_sync(h) != 0)
315 1 0 if (sv_isobject(self_or_class)) {
317 0 1 if (!h) croak("Attempted to use a destroyed object");
320 0 0 if (items < 2) croak("Usage: Data::PubSub::Shared::Int->unlink($path)");
323 0 1 if (!path) croak("cannot unlink anonymous or memfd pubsub");
324 0 1 if (unlink(path) != 0)
331 9 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int", self);
0 9 EXTRACT_HANDLE("Data::PubSub::Shared::Int", self);
0 9 EXTRACT_HANDLE("Data::PubSub::Shared::Int", self);
334 0 9 if (RETVAL < 0) croak("eventfd: %s", strerror(errno));
343 1 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int", self);
0 1 EXTRACT_HANDLE("Data::PubSub::Shared::Int", self);
0 1 EXTRACT_HANDLE("Data::PubSub::Shared::Int", self);
351 1 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int", self);
0 1 EXTRACT_HANDLE("Data::PubSub::Shared::Int", self);
0 1 EXTRACT_HANDLE("Data::PubSub::Shared::Int", self);
353 0 1 RETVAL = h->notify_fd;
361 4 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int", self);
0 4 EXTRACT_HANDLE("Data::PubSub::Shared::Int", self);
0 4 EXTRACT_HANDLE("Data::PubSub::Shared::Int", self);
364 4 0 RETVAL = (v >= 0) ? newSViv((IV)v) : &PL_sv_undef;
372 4 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int", self);
0 4 EXTRACT_HANDLE("Data::PubSub::Shared::Int", self);
0 4 EXTRACT_HANDLE("Data::PubSub::Shared::Int", self);
382 0 47 if (!SvROK(self)) return;
384 0 47 if (!sub) return;
386 47 0 if (sub->userdata) SvREFCNT_dec((SV *)sub->userdata);
393 35 0 EXTRACT_SUB("Data::PubSub::Shared::Int::Sub", self);
0 35 EXTRACT_SUB("Data::PubSub::Shared::Int::Sub", self);
0 35 EXTRACT_SUB("Data::PubSub::Shared::Int::Sub", self);
397 31 4 if (r == 1)
409 2 0 EXTRACT_SUB("Data::PubSub::Shared::Int::Sub", self);
0 2 EXTRACT_SUB("Data::PubSub::Shared::Int::Sub", self);
0 2 EXTRACT_SUB("Data::PubSub::Shared::Int::Sub", self);
412 10 2 for (UV i = 0; i < count; i++) {
414 0 10 if (r != 1) break;
415 0 10 mXPUSHi((IV)value);
422 9 0 EXTRACT_SUB("Data::PubSub::Shared::Int::Sub", self);
0 9 EXTRACT_SUB("Data::PubSub::Shared::Int::Sub", self);
0 9 EXTRACT_SUB("Data::PubSub::Shared::Int::Sub", self);
426 9 0 if (items > 1) timeout = SvNV(ST(1));
428 8 1 if (r == 1)
439 8 0 EXTRACT_SUB("Data::PubSub::Shared::Int::Sub", self);
0 8 EXTRACT_SUB("Data::PubSub::Shared::Int::Sub", self);
0 8 EXTRACT_SUB("Data::PubSub::Shared::Int::Sub", self);
443 1 7 max_count = (items > 1) ? (uint32_t)SvUV(ST(1)) : UINT32_MAX;
444 1027 1 while (max_count-- > 0 && pubsub_int_poll(sub, &value))
1020 7 while (max_count-- > 0 && pubsub_int_poll(sub, &value))
445 0 1020 mXPUSHi((IV)value);
452 3 0 EXTRACT_SUB("Data::PubSub::Shared::Int::Sub", self);
0 3 EXTRACT_SUB("Data::PubSub::Shared::Int::Sub", self);
0 3 EXTRACT_SUB("Data::PubSub::Shared::Int::Sub", self);
456 1 2 if (count == 0) XSRETURN(0);
457 2 0 if (items > 2) timeout = SvNV(ST(2));
458 1 1 if (!pubsub_int_poll_wait(sub, &value, timeout)) XSRETURN(0);
459 0 1 mXPUSHi((IV)value);
460 4 1 for (UV i = 1; i < count; i++) {
461 0 4 if (!pubsub_int_poll(sub, &value)) break;
462 0 4 mXPUSHi((IV)value);
469 18 0 EXTRACT_SUB("Data::PubSub::Shared::Int::Sub", self);
0 18 EXTRACT_SUB("Data::PubSub::Shared::Int::Sub", self);
0 18 EXTRACT_SUB("Data::PubSub::Shared::Int::Sub", self);
479 2 0 EXTRACT_SUB("Data::PubSub::Shared::Int::Sub", self);
0 2 EXTRACT_SUB("Data::PubSub::Shared::Int::Sub", self);
0 2 EXTRACT_SUB("Data::PubSub::Shared::Int::Sub", self);
481 0 2 RETVAL = (UV)sub->overflow_count;
489 2 0 EXTRACT_SUB("Data::PubSub::Shared::Int::Sub", self);
0 2 EXTRACT_SUB("Data::PubSub::Shared::Int::Sub", self);
0 2 EXTRACT_SUB("Data::PubSub::Shared::Int::Sub", self);
491 0 2 RETVAL = (UV)__atomic_load_n(&sub->hdr->write_pos, __ATOMIC_RELAXED);
499 2 0 EXTRACT_SUB("Data::PubSub::Shared::Int::Sub", self);
0 2 EXTRACT_SUB("Data::PubSub::Shared::Int::Sub", self);
0 2 EXTRACT_SUB("Data::PubSub::Shared::Int::Sub", self);
502 1 1 RETVAL = (sub->cursor < wp && wp - sub->cursor > sub->capacity);
1 0 RETVAL = (sub->cursor < wp && wp - sub->cursor > sub->capacity);
1 1 RETVAL = (sub->cursor < wp && wp - sub->cursor > sub->capacity);
510 6 0 EXTRACT_SUB("Data::PubSub::Shared::Int::Sub", self);
0 6 EXTRACT_SUB("Data::PubSub::Shared::Int::Sub", self);
0 6 EXTRACT_SUB("Data::PubSub::Shared::Int::Sub", self);
512 2 4 if (items > 1) sub->cursor = (uint64_t)SvUV(ST(1));
513 0 6 RETVAL = (UV)sub->cursor;
521 1 0 EXTRACT_SUB("Data::PubSub::Shared::Int::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Int::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Int::Sub", self);
529 2 0 EXTRACT_SUB("Data::PubSub::Shared::Int::Sub", self);
0 2 EXTRACT_SUB("Data::PubSub::Shared::Int::Sub", self);
0 2 EXTRACT_SUB("Data::PubSub::Shared::Int::Sub", self);
532 0 2 sub->cursor = (wp > sub->capacity) ? wp - sub->capacity : 0;
539 3 0 EXTRACT_SUB("Data::PubSub::Shared::Int::Sub", self);
0 3 EXTRACT_SUB("Data::PubSub::Shared::Int::Sub", self);
0 3 EXTRACT_SUB("Data::PubSub::Shared::Int::Sub", self);
550 105 3 while (pubsub_int_poll(sub, &value)) {
553 0 105 PUSHMARK(SP);
554 0 105 mXPUSHi((IV)value);
557 105 0 FREETMPS; LEAVE;
567 3 0 EXTRACT_SUB("Data::PubSub::Shared::Int::Sub", self);
0 3 EXTRACT_SUB("Data::PubSub::Shared::Int::Sub", self);
0 3 EXTRACT_SUB("Data::PubSub::Shared::Int::Sub", self);
572 1 2 max_count = (items > 1) ? (uint32_t)SvUV(ST(1)) : UINT32_MAX;
573 7 1 while (max_count-- > 0 && pubsub_int_poll(sub, &value))
5 2 while (max_count-- > 0 && pubsub_int_poll(sub, &value))
574 0 5 mXPUSHi((IV)value);
581 1 0 EXTRACT_SUB("Data::PubSub::Shared::Int::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Int::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Int::Sub", self);
589 3 0 EXTRACT_SUB("Data::PubSub::Shared::Int::Sub", self);
0 3 EXTRACT_SUB("Data::PubSub::Shared::Int::Sub", self);
0 3 EXTRACT_SUB("Data::PubSub::Shared::Int::Sub", self);
591 0 3 RETVAL = sub->notify_fd;
606 21 35 msg_size = (items > 3) ? (uint32_t)SvUV(ST(3)) : 0;
607 0 56 mode_t fmode = (items > 4 && (SvGETMAGIC(ST(4)), SvOK(ST(4)))) ? (mode_t)SvUV(ST(4)) : 0600;
0 0 mode_t fmode = (items > 4 && (SvGETMAGIC(ST(4)), SvOK(ST(4)))) ? (mode_t)SvUV(ST(4)) : 0600;
0 0 mode_t fmode = (items > 4 && (SvGETMAGIC(ST(4)), SvOK(ST(4)))) ? (mode_t)SvUV(ST(4)) : 0600;
0 0 mode_t fmode = (items > 4 && (SvGETMAGIC(ST(4)), SvOK(ST(4)))) ? (mode_t)SvUV(ST(4)) : 0600;
608 0 56 const char *p = (SvGETMAGIC(path), SvOK(path)) ? SvPV_nolen(path) : NULL;
0 0 const char *p = (SvGETMAGIC(path), SvOK(path)) ? SvPV_nolen(path) : NULL;
15 41 const char *p = (SvGETMAGIC(path), SvOK(path)) ? SvPV_nolen(path) : NULL;
610 1 55 if (!h) croak("Data::PubSub::Shared::Str->new: %s", errbuf);
624 0 1 msg_size = (items > 3) ? (uint32_t)SvUV(ST(3)) : 0;
626 0 1 if (!h) croak("Data::PubSub::Shared::Str->new_memfd: %s", errbuf);
639 0 1 if (!h) croak("Data::PubSub::Shared::Str->new_from_fd: %s", errbuf);
648 1 0 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
0 1 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
0 1 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
650 0 1 RETVAL = h->backing_fd;
658 0 57 if (!SvROK(self)) return;
660 0 57 if (!h) return;
669 392 0 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
0 392 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
0 392 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
672 0 392 SvGETMAGIC(value); /* run get-magic/overload before reading the UTF8 flag */
0 0 SvGETMAGIC(value); /* run get-magic/overload before reading the UTF8 flag */
676 2 390 if (r == -1) croak("publish: message too long (%u > %u)", (unsigned)len, h->msg_size);
685 5 0 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
0 5 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
0 5 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
689 4 1 if (count > 0) {
698 13 4 for (uint32_t i = 0; i < count; i++) {
700 0 13 SvGETMAGIC(val);
0 0 SvGETMAGIC(val);
705 13 3 for (uint32_t i = 0; i < count; i++) {
707 1 12 if (r == -1) {
724 1 0 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
0 1 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
0 1 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
727 0 1 SvGETMAGIC(value); /* run get-magic/overload before reading the UTF8 flag */
0 0 SvGETMAGIC(value); /* run get-magic/overload before reading the UTF8 flag */
731 0 1 if (r == -1) croak("publish_notify: message too long (%u > %u)", (unsigned)len, h->msg_size);
738 218 0 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
0 218 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
0 218 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
741 0 218 if (!sub) croak("subscribe: out of memory");
751 24 0 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
0 24 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
0 24 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
754 0 24 if (!sub) croak("subscribe_all: out of memory");
764 1 0 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
0 1 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
0 1 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
766 0 1 RETVAL = h->capacity;
774 2 0 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
0 2 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
0 2 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
776 0 2 RETVAL = h->msg_size;
784 7 0 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
0 7 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
0 7 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
786 0 7 RETVAL = (UV)__atomic_load_n(&h->hdr->write_pos, __ATOMIC_RELAXED);
794 0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
796 0 0 RETVAL = h->path ? newSVpv(h->path, 0) : &PL_sv_undef;
804 2 0 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
0 2 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
0 2 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
828 2 0 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
0 2 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
0 2 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
836 2 0 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
0 2 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
0 2 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
838 0 2 if (pubsub_sync(h) != 0)
846 1 0 if (sv_isobject(self_or_class)) {
848 0 1 if (!h) croak("Attempted to use a destroyed object");
851 0 0 if (items < 2) croak("Usage: Data::PubSub::Shared::Str->unlink($path)");
854 0 1 if (!path) croak("cannot unlink anonymous or memfd pubsub");
855 0 1 if (unlink(path) != 0)
862 4 0 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
0 4 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
0 4 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
865 0 4 if (RETVAL < 0) croak("eventfd: %s", strerror(errno));
874 0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
882 0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
884 0 0 RETVAL = h->notify_fd;
892 2 0 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
0 2 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
0 2 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
895 2 0 RETVAL = (v >= 0) ? newSViv((IV)v) : &PL_sv_undef;
903 2 0 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
0 2 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
0 2 EXTRACT_HANDLE("Data::PubSub::Shared::Str", self);
913 0 242 if (!SvROK(self)) return;
915 0 242 if (!sub) return;
917 242 0 if (sub->userdata) SvREFCNT_dec((SV *)sub->userdata);
924 881 0 EXTRACT_SUB("Data::PubSub::Shared::Str::Sub", self);
0 881 EXTRACT_SUB("Data::PubSub::Shared::Str::Sub", self);
0 881 EXTRACT_SUB("Data::PubSub::Shared::Str::Sub", self);
930 878 3 if (r == 1) {
932 2 876 if (utf8) SvUTF8_on(RETVAL);
944 1 0 EXTRACT_SUB("Data::PubSub::Shared::Str::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Str::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Str::Sub", self);
949 4 0 for (UV i = 0; i < count; i++) {
951 1 3 if (r != 1) break;
953 0 3 if (utf8) SvUTF8_on(sv);
954 0 3 mXPUSHs(sv);
961 54 0 EXTRACT_SUB("Data::PubSub::Shared::Str::Sub", self);
0 54 EXTRACT_SUB("Data::PubSub::Shared::Str::Sub", self);
0 54 EXTRACT_SUB("Data::PubSub::Shared::Str::Sub", self);
967 54 0 if (items > 1) timeout = SvNV(ST(1));
969 53 1 if (r == 1) {
971 0 53 if (utf8) SvUTF8_on(RETVAL);
982 4 0 EXTRACT_SUB("Data::PubSub::Shared::Str::Sub", self);
0 4 EXTRACT_SUB("Data::PubSub::Shared::Str::Sub", self);
0 4 EXTRACT_SUB("Data::PubSub::Shared::Str::Sub", self);
988 0 4 max_count = (items > 1) ? (uint32_t)SvUV(ST(1)) : UINT32_MAX;
989 20 0 while (max_count-- > 0 && pubsub_str_poll(sub, &str, &len, &utf8) == 1) {
16 4 while (max_count-- > 0 && pubsub_str_poll(sub, &str, &len, &utf8) == 1) {
991 0 16 if (utf8) SvUTF8_on(sv);
992 0 16 mXPUSHs(sv);
1000 2 0 EXTRACT_SUB("Data::PubSub::Shared::Str::Sub", self);
0 2 EXTRACT_SUB("Data::PubSub::Shared::Str::Sub", self);
0 2 EXTRACT_SUB("Data::PubSub::Shared::Str::Sub", self);
1006 1 1 if (count == 0) XSRETURN(0);
1007 1 0 if (items > 2) timeout = SvNV(ST(2));
1008 0 1 if (pubsub_str_poll_wait(sub, &str, &len, &utf8, timeout) != 1) XSRETURN(0);
1011 0 1 if (utf8) SvUTF8_on(sv);
1012 0 1 mXPUSHs(sv);
1014 2 1 for (UV i = 1; i < count; i++) {
1015 0 2 if (pubsub_str_poll(sub, &str, &len, &utf8) != 1) break;
1017 0 2 if (utf8) SvUTF8_on(sv);
1018 0 2 mXPUSHs(sv);
1025 8 0 EXTRACT_SUB("Data::PubSub::Shared::Str::Sub", self);
0 8 EXTRACT_SUB("Data::PubSub::Shared::Str::Sub", self);
0 8 EXTRACT_SUB("Data::PubSub::Shared::Str::Sub", self);
1035 1 0 EXTRACT_SUB("Data::PubSub::Shared::Str::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Str::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Str::Sub", self);
1037 0 1 RETVAL = (UV)sub->overflow_count;
1045 1 0 EXTRACT_SUB("Data::PubSub::Shared::Str::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Str::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Str::Sub", self);
1047 0 1 RETVAL = (UV)__atomic_load_n(&sub->hdr->write_pos, __ATOMIC_RELAXED);
1055 2 0 EXTRACT_SUB("Data::PubSub::Shared::Str::Sub", self);
0 2 EXTRACT_SUB("Data::PubSub::Shared::Str::Sub", self);
0 2 EXTRACT_SUB("Data::PubSub::Shared::Str::Sub", self);
1058 1 1 RETVAL = (sub->cursor < wp && wp - sub->cursor > sub->capacity);
1 0 RETVAL = (sub->cursor < wp && wp - sub->cursor > sub->capacity);
1 1 RETVAL = (sub->cursor < wp && wp - sub->cursor > sub->capacity);
1066 848 0 EXTRACT_SUB("Data::PubSub::Shared::Str::Sub", self);
0 848 EXTRACT_SUB("Data::PubSub::Shared::Str::Sub", self);
0 848 EXTRACT_SUB("Data::PubSub::Shared::Str::Sub", self);
1068 846 2 if (items > 1) sub->cursor = (uint64_t)SvUV(ST(1));
1069 843 5 RETVAL = (UV)sub->cursor;
1077 1 0 EXTRACT_SUB("Data::PubSub::Shared::Str::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Str::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Str::Sub", self);
1085 1 0 EXTRACT_SUB("Data::PubSub::Shared::Str::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Str::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Str::Sub", self);
1088 0 1 sub->cursor = (wp > sub->capacity) ? wp - sub->capacity : 0;
1095 2 0 EXTRACT_SUB("Data::PubSub::Shared::Str::Sub", self);
0 2 EXTRACT_SUB("Data::PubSub::Shared::Str::Sub", self);
0 2 EXTRACT_SUB("Data::PubSub::Shared::Str::Sub", self);
1108 4 2 while (pubsub_str_poll(sub, &str, &len, &utf8) == 1) {
1112 1 3 if (utf8) SvUTF8_on(sv);
1113 0 4 PUSHMARK(SP);
1114 0 4 mXPUSHs(sv);
1117 4 0 FREETMPS; LEAVE;
1127 1 0 EXTRACT_SUB("Data::PubSub::Shared::Str::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Str::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Str::Sub", self);
1134 0 1 max_count = (items > 1) ? (uint32_t)SvUV(ST(1)) : UINT32_MAX;
1135 2 0 while (max_count-- > 0 && pubsub_str_poll(sub, &str, &len, &utf8) == 1) {
1 1 while (max_count-- > 0 && pubsub_str_poll(sub, &str, &len, &utf8) == 1) {
1137 0 1 if (utf8) SvUTF8_on(sv);
1138 0 1 mXPUSHs(sv);
1146 0 0 EXTRACT_SUB("Data::PubSub::Shared::Str::Sub", self);
0 0 EXTRACT_SUB("Data::PubSub::Shared::Str::Sub", self);
0 0 EXTRACT_SUB("Data::PubSub::Shared::Str::Sub", self);
1154 1 0 EXTRACT_SUB("Data::PubSub::Shared::Str::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Str::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Str::Sub", self);
1156 0 1 RETVAL = sub->notify_fd;
1170 0 12 mode_t fmode = (items > 3 && (SvGETMAGIC(ST(3)), SvOK(ST(3)))) ? (mode_t)SvUV(ST(3)) : 0600;
0 0 mode_t fmode = (items > 3 && (SvGETMAGIC(ST(3)), SvOK(ST(3)))) ? (mode_t)SvUV(ST(3)) : 0600;
0 0 mode_t fmode = (items > 3 && (SvGETMAGIC(ST(3)), SvOK(ST(3)))) ? (mode_t)SvUV(ST(3)) : 0600;
0 0 mode_t fmode = (items > 3 && (SvGETMAGIC(ST(3)), SvOK(ST(3)))) ? (mode_t)SvUV(ST(3)) : 0600;
1171 0 12 const char *p = (SvGETMAGIC(path), SvOK(path)) ? SvPV_nolen(path) : NULL;
0 0 const char *p = (SvGETMAGIC(path), SvOK(path)) ? SvPV_nolen(path) : NULL;
2 10 const char *p = (SvGETMAGIC(path), SvOK(path)) ? SvPV_nolen(path) : NULL;
1173 1 11 if (!h) croak("Data::PubSub::Shared::Int32->new: %s", errbuf);
1187 0 1 if (!h) croak("Data::PubSub::Shared::Int32->new_memfd: %s", errbuf);
1200 0 1 if (!h) croak("Data::PubSub::Shared::Int32->new_from_fd: %s", errbuf);
1209 1 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int32", self);
0 1 EXTRACT_HANDLE("Data::PubSub::Shared::Int32", self);
0 1 EXTRACT_HANDLE("Data::PubSub::Shared::Int32", self);
1211 0 1 RETVAL = h->backing_fd;
1219 0 13 if (!SvROK(self)) return;
1221 0 13 if (!h) return;
1230 50 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int32", self);
0 50 EXTRACT_HANDLE("Data::PubSub::Shared::Int32", self);
0 50 EXTRACT_HANDLE("Data::PubSub::Shared::Int32", self);
1232 50 0 RETVAL = pubsub_int32_publish(h, (int32_t)value);
1240 1 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int32", self);
0 1 EXTRACT_HANDLE("Data::PubSub::Shared::Int32", self);
0 1 EXTRACT_HANDLE("Data::PubSub::Shared::Int32", self);
1243 0 1 if (count == 0) { RETVAL = 0; }
1245 0 1 if (count > 8192) croak("publish_multi: too many values (%u > 8192)", count);
1247 3 1 for (uint32_t i = 0; i < count; i++)
1259 0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int32", self);
0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int32", self);
0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int32", self);
1268 4 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int32", self);
0 4 EXTRACT_HANDLE("Data::PubSub::Shared::Int32", self);
0 4 EXTRACT_HANDLE("Data::PubSub::Shared::Int32", self);
1271 0 4 if (!sub) croak("subscribe: out of memory");
1281 7 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int32", self);
0 7 EXTRACT_HANDLE("Data::PubSub::Shared::Int32", self);
0 7 EXTRACT_HANDLE("Data::PubSub::Shared::Int32", self);
1284 0 7 if (!sub) croak("subscribe_all: out of memory");
1294 1 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int32", self);
0 1 EXTRACT_HANDLE("Data::PubSub::Shared::Int32", self);
0 1 EXTRACT_HANDLE("Data::PubSub::Shared::Int32", self);
1296 0 1 RETVAL = h->capacity;
1304 4 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int32", self);
0 4 EXTRACT_HANDLE("Data::PubSub::Shared::Int32", self);
0 4 EXTRACT_HANDLE("Data::PubSub::Shared::Int32", self);
1306 0 4 RETVAL = (UV)__atomic_load_n(&h->hdr->write_pos, __ATOMIC_RELAXED);
1314 0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int32", self);
0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int32", self);
0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int32", self);
1316 0 0 RETVAL = h->path ? newSVpv(h->path, 0) : &PL_sv_undef;
1324 2 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int32", self);
0 2 EXTRACT_HANDLE("Data::PubSub::Shared::Int32", self);
0 2 EXTRACT_HANDLE("Data::PubSub::Shared::Int32", self);
1346 1 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int32", self);
0 1 EXTRACT_HANDLE("Data::PubSub::Shared::Int32", self);
0 1 EXTRACT_HANDLE("Data::PubSub::Shared::Int32", self);
1354 1 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int32", self);
0 1 EXTRACT_HANDLE("Data::PubSub::Shared::Int32", self);
0 1 EXTRACT_HANDLE("Data::PubSub::Shared::Int32", self);
1356 0 1 if (pubsub_sync(h) != 0)
1364 0 0 if (sv_isobject(self_or_class)) {
1366 0 0 if (!h) croak("Attempted to use a destroyed object");
1369 0 0 if (items < 2) croak("Usage: Data::PubSub::Shared::Int32->unlink($path)");
1372 0 0 if (!path) croak("cannot unlink anonymous or memfd pubsub");
1373 0 0 if (unlink(path) != 0)
1380 0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int32", self);
0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int32", self);
0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int32", self);
1383 0 0 if (RETVAL < 0) croak("eventfd: %s", strerror(errno));
1392 0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int32", self);
0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int32", self);
0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int32", self);
1400 0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int32", self);
0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int32", self);
0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int32", self);
1402 0 0 RETVAL = h->notify_fd;
1410 0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int32", self);
0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int32", self);
0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int32", self);
1413 0 0 RETVAL = (v >= 0) ? newSViv((IV)v) : &PL_sv_undef;
1421 0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int32", self);
0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int32", self);
0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int32", self);
1431 0 11 if (!SvROK(self)) return;
1433 0 11 if (!sub) return;
1435 11 0 if (sub->userdata) SvREFCNT_dec((SV *)sub->userdata);
1442 9 0 EXTRACT_SUB("Data::PubSub::Shared::Int32::Sub", self);
0 9 EXTRACT_SUB("Data::PubSub::Shared::Int32::Sub", self);
0 9 EXTRACT_SUB("Data::PubSub::Shared::Int32::Sub", self);
1446 8 1 if (r == 1)
1458 1 0 EXTRACT_SUB("Data::PubSub::Shared::Int32::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Int32::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Int32::Sub", self);
1461 7 0 for (UV i = 0; i < count; i++) {
1463 1 6 if (r != 1) break;
1464 0 6 mXPUSHi((IV)value);
1471 1 0 EXTRACT_SUB("Data::PubSub::Shared::Int32::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Int32::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Int32::Sub", self);
1475 1 0 if (items > 1) timeout = SvNV(ST(1));
1477 0 1 if (r == 1)
1488 1 0 EXTRACT_SUB("Data::PubSub::Shared::Int32::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Int32::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Int32::Sub", self);
1492 0 1 max_count = (items > 1) ? (uint32_t)SvUV(ST(1)) : UINT32_MAX;
1493 9 0 while (max_count-- > 0 && pubsub_int32_poll(sub, &value))
8 1 while (max_count-- > 0 && pubsub_int32_poll(sub, &value))
1494 0 8 mXPUSHi((IV)value);
1501 1 0 EXTRACT_SUB("Data::PubSub::Shared::Int32::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Int32::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Int32::Sub", self);
1505 0 1 if (count == 0) XSRETURN(0);
1506 1 0 if (items > 2) timeout = SvNV(ST(2));
1507 0 1 if (!pubsub_int32_poll_wait(sub, &value, timeout)) XSRETURN(0);
1508 0 1 mXPUSHi((IV)value);
1509 2 1 for (UV i = 1; i < count; i++) {
1510 0 2 if (!pubsub_int32_poll(sub, &value)) break;
1511 0 2 mXPUSHi((IV)value);
1518 3 0 EXTRACT_SUB("Data::PubSub::Shared::Int32::Sub", self);
0 3 EXTRACT_SUB("Data::PubSub::Shared::Int32::Sub", self);
0 3 EXTRACT_SUB("Data::PubSub::Shared::Int32::Sub", self);
1528 1 0 EXTRACT_SUB("Data::PubSub::Shared::Int32::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Int32::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Int32::Sub", self);
1530 0 1 RETVAL = (UV)sub->overflow_count;
1538 0 0 EXTRACT_SUB("Data::PubSub::Shared::Int32::Sub", self);
0 0 EXTRACT_SUB("Data::PubSub::Shared::Int32::Sub", self);
0 0 EXTRACT_SUB("Data::PubSub::Shared::Int32::Sub", self);
1540 0 0 RETVAL = (UV)__atomic_load_n(&sub->hdr->write_pos, __ATOMIC_RELAXED);
1548 1 0 EXTRACT_SUB("Data::PubSub::Shared::Int32::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Int32::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Int32::Sub", self);
1551 1 0 RETVAL = (sub->cursor < wp && wp - sub->cursor > sub->capacity);
1 0 RETVAL = (sub->cursor < wp && wp - sub->cursor > sub->capacity);
1 0 RETVAL = (sub->cursor < wp && wp - sub->cursor > sub->capacity);
1559 1 0 EXTRACT_SUB("Data::PubSub::Shared::Int32::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Int32::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Int32::Sub", self);
1561 0 1 if (items > 1) sub->cursor = (uint64_t)SvUV(ST(1));
1562 0 1 RETVAL = (UV)sub->cursor;
1570 1 0 EXTRACT_SUB("Data::PubSub::Shared::Int32::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Int32::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Int32::Sub", self);
1578 1 0 EXTRACT_SUB("Data::PubSub::Shared::Int32::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Int32::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Int32::Sub", self);
1581 0 1 sub->cursor = (wp > sub->capacity) ? wp - sub->capacity : 0;
1588 1 0 EXTRACT_SUB("Data::PubSub::Shared::Int32::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Int32::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Int32::Sub", self);
1599 5 1 while (pubsub_int32_poll(sub, &value)) {
1602 0 5 PUSHMARK(SP);
1603 0 5 mXPUSHi((IV)value);
1606 5 0 FREETMPS; LEAVE;
1616 0 0 EXTRACT_SUB("Data::PubSub::Shared::Int32::Sub", self);
0 0 EXTRACT_SUB("Data::PubSub::Shared::Int32::Sub", self);
0 0 EXTRACT_SUB("Data::PubSub::Shared::Int32::Sub", self);
1621 0 0 max_count = (items > 1) ? (uint32_t)SvUV(ST(1)) : UINT32_MAX;
1622 0 0 while (max_count-- > 0 && pubsub_int32_poll(sub, &value))
0 0 while (max_count-- > 0 && pubsub_int32_poll(sub, &value))
1623 0 0 mXPUSHi((IV)value);
1630 0 0 EXTRACT_SUB("Data::PubSub::Shared::Int32::Sub", self);
0 0 EXTRACT_SUB("Data::PubSub::Shared::Int32::Sub", self);
0 0 EXTRACT_SUB("Data::PubSub::Shared::Int32::Sub", self);
1638 0 0 EXTRACT_SUB("Data::PubSub::Shared::Int32::Sub", self);
0 0 EXTRACT_SUB("Data::PubSub::Shared::Int32::Sub", self);
0 0 EXTRACT_SUB("Data::PubSub::Shared::Int32::Sub", self);
1640 0 0 RETVAL = sub->notify_fd;
1654 0 11 mode_t fmode = (items > 3 && (SvGETMAGIC(ST(3)), SvOK(ST(3)))) ? (mode_t)SvUV(ST(3)) : 0600;
0 0 mode_t fmode = (items > 3 && (SvGETMAGIC(ST(3)), SvOK(ST(3)))) ? (mode_t)SvUV(ST(3)) : 0600;
0 0 mode_t fmode = (items > 3 && (SvGETMAGIC(ST(3)), SvOK(ST(3)))) ? (mode_t)SvUV(ST(3)) : 0600;
0 0 mode_t fmode = (items > 3 && (SvGETMAGIC(ST(3)), SvOK(ST(3)))) ? (mode_t)SvUV(ST(3)) : 0600;
1655 0 11 const char *p = (SvGETMAGIC(path), SvOK(path)) ? SvPV_nolen(path) : NULL;
0 0 const char *p = (SvGETMAGIC(path), SvOK(path)) ? SvPV_nolen(path) : NULL;
1 10 const char *p = (SvGETMAGIC(path), SvOK(path)) ? SvPV_nolen(path) : NULL;
1657 1 10 if (!h) croak("Data::PubSub::Shared::Int16->new: %s", errbuf);
1671 0 1 if (!h) croak("Data::PubSub::Shared::Int16->new_memfd: %s", errbuf);
1684 0 1 if (!h) croak("Data::PubSub::Shared::Int16->new_from_fd: %s", errbuf);
1693 1 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int16", self);
0 1 EXTRACT_HANDLE("Data::PubSub::Shared::Int16", self);
0 1 EXTRACT_HANDLE("Data::PubSub::Shared::Int16", self);
1695 1 0 RETVAL = h->backing_fd;
1703 0 12 if (!SvROK(self)) return;
1705 0 12 if (!h) return;
1714 49 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int16", self);
0 49 EXTRACT_HANDLE("Data::PubSub::Shared::Int16", self);
0 49 EXTRACT_HANDLE("Data::PubSub::Shared::Int16", self);
1716 49 0 RETVAL = pubsub_int16_publish(h, (int16_t)value);
1724 1 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int16", self);
0 1 EXTRACT_HANDLE("Data::PubSub::Shared::Int16", self);
0 1 EXTRACT_HANDLE("Data::PubSub::Shared::Int16", self);
1727 0 1 if (count == 0) { RETVAL = 0; }
1729 0 1 if (count > 8192) croak("publish_multi: too many values (%u > 8192)", count);
1731 3 1 for (uint32_t i = 0; i < count; i++)
1743 0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int16", self);
0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int16", self);
0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int16", self);
1752 4 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int16", self);
0 4 EXTRACT_HANDLE("Data::PubSub::Shared::Int16", self);
0 4 EXTRACT_HANDLE("Data::PubSub::Shared::Int16", self);
1755 0 4 if (!sub) croak("subscribe: out of memory");
1765 7 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int16", self);
0 7 EXTRACT_HANDLE("Data::PubSub::Shared::Int16", self);
0 7 EXTRACT_HANDLE("Data::PubSub::Shared::Int16", self);
1768 0 7 if (!sub) croak("subscribe_all: out of memory");
1778 1 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int16", self);
0 1 EXTRACT_HANDLE("Data::PubSub::Shared::Int16", self);
0 1 EXTRACT_HANDLE("Data::PubSub::Shared::Int16", self);
1780 1 0 RETVAL = h->capacity;
1788 4 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int16", self);
0 4 EXTRACT_HANDLE("Data::PubSub::Shared::Int16", self);
0 4 EXTRACT_HANDLE("Data::PubSub::Shared::Int16", self);
1790 4 0 RETVAL = (UV)__atomic_load_n(&h->hdr->write_pos, __ATOMIC_RELAXED);
1798 0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int16", self);
0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int16", self);
0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int16", self);
1800 0 0 RETVAL = h->path ? newSVpv(h->path, 0) : &PL_sv_undef;
1808 2 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int16", self);
0 2 EXTRACT_HANDLE("Data::PubSub::Shared::Int16", self);
0 2 EXTRACT_HANDLE("Data::PubSub::Shared::Int16", self);
1830 1 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int16", self);
0 1 EXTRACT_HANDLE("Data::PubSub::Shared::Int16", self);
0 1 EXTRACT_HANDLE("Data::PubSub::Shared::Int16", self);
1838 0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int16", self);
0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int16", self);
0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int16", self);
1840 0 0 if (pubsub_sync(h) != 0)
1848 0 0 if (sv_isobject(self_or_class)) {
1850 0 0 if (!h) croak("Attempted to use a destroyed object");
1853 0 0 if (items < 2) croak("Usage: Data::PubSub::Shared::Int16->unlink($path)");
1856 0 0 if (!path) croak("cannot unlink anonymous or memfd pubsub");
1857 0 0 if (unlink(path) != 0)
1864 0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int16", self);
0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int16", self);
0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int16", self);
1867 0 0 if (RETVAL < 0) croak("eventfd: %s", strerror(errno));
1876 0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int16", self);
0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int16", self);
0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int16", self);
1884 0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int16", self);
0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int16", self);
0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int16", self);
1886 0 0 RETVAL = h->notify_fd;
1894 0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int16", self);
0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int16", self);
0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int16", self);
1897 0 0 RETVAL = (v >= 0) ? newSViv((IV)v) : &PL_sv_undef;
1905 0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int16", self);
0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int16", self);
0 0 EXTRACT_HANDLE("Data::PubSub::Shared::Int16", self);
1915 0 11 if (!SvROK(self)) return;
1917 0 11 if (!sub) return;
1919 11 0 if (sub->userdata) SvREFCNT_dec((SV *)sub->userdata);
1926 9 0 EXTRACT_SUB("Data::PubSub::Shared::Int16::Sub", self);
0 9 EXTRACT_SUB("Data::PubSub::Shared::Int16::Sub", self);
0 9 EXTRACT_SUB("Data::PubSub::Shared::Int16::Sub", self);
1930 8 1 if (r == 1)
1942 1 0 EXTRACT_SUB("Data::PubSub::Shared::Int16::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Int16::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Int16::Sub", self);
1945 7 0 for (UV i = 0; i < count; i++) {
1947 1 6 if (r != 1) break;
1948 0 6 mXPUSHi((IV)value);
1955 1 0 EXTRACT_SUB("Data::PubSub::Shared::Int16::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Int16::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Int16::Sub", self);
1959 1 0 if (items > 1) timeout = SvNV(ST(1));
1961 0 1 if (r == 1)
1972 1 0 EXTRACT_SUB("Data::PubSub::Shared::Int16::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Int16::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Int16::Sub", self);
1976 0 1 max_count = (items > 1) ? (uint32_t)SvUV(ST(1)) : UINT32_MAX;
1977 9 0 while (max_count-- > 0 && pubsub_int16_poll(sub, &value))
8 1 while (max_count-- > 0 && pubsub_int16_poll(sub, &value))
1978 0 8 mXPUSHi((IV)value);
1985 1 0 EXTRACT_SUB("Data::PubSub::Shared::Int16::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Int16::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Int16::Sub", self);
1989 0 1 if (count == 0) XSRETURN(0);
1990 1 0 if (items > 2) timeout = SvNV(ST(2));
1991 0 1 if (!pubsub_int16_poll_wait(sub, &value, timeout)) XSRETURN(0);
1992 0 1 mXPUSHi((IV)value);
1993 2 1 for (UV i = 1; i < count; i++) {
1994 0 2 if (!pubsub_int16_poll(sub, &value)) break;
1995 0 2 mXPUSHi((IV)value);
2002 3 0 EXTRACT_SUB("Data::PubSub::Shared::Int16::Sub", self);
0 3 EXTRACT_SUB("Data::PubSub::Shared::Int16::Sub", self);
0 3 EXTRACT_SUB("Data::PubSub::Shared::Int16::Sub", self);
2012 1 0 EXTRACT_SUB("Data::PubSub::Shared::Int16::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Int16::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Int16::Sub", self);
2014 1 0 RETVAL = (UV)sub->overflow_count;
2022 0 0 EXTRACT_SUB("Data::PubSub::Shared::Int16::Sub", self);
0 0 EXTRACT_SUB("Data::PubSub::Shared::Int16::Sub", self);
0 0 EXTRACT_SUB("Data::PubSub::Shared::Int16::Sub", self);
2024 0 0 RETVAL = (UV)__atomic_load_n(&sub->hdr->write_pos, __ATOMIC_RELAXED);
2032 1 0 EXTRACT_SUB("Data::PubSub::Shared::Int16::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Int16::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Int16::Sub", self);
2035 1 0 RETVAL = (sub->cursor < wp && wp - sub->cursor > sub->capacity);
1 0 RETVAL = (sub->cursor < wp && wp - sub->cursor > sub->capacity);
1 0 RETVAL = (sub->cursor < wp && wp - sub->cursor > sub->capacity);
2043 1 0 EXTRACT_SUB("Data::PubSub::Shared::Int16::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Int16::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Int16::Sub", self);
2045 0 1 if (items > 1) sub->cursor = (uint64_t)SvUV(ST(1));
2046 1 0 RETVAL = (UV)sub->cursor;
2054 1 0 EXTRACT_SUB("Data::PubSub::Shared::Int16::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Int16::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Int16::Sub", self);
2062 1 0 EXTRACT_SUB("Data::PubSub::Shared::Int16::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Int16::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Int16::Sub", self);
2065 0 1 sub->cursor = (wp > sub->capacity) ? wp - sub->capacity : 0;
2072 1 0 EXTRACT_SUB("Data::PubSub::Shared::Int16::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Int16::Sub", self);
0 1 EXTRACT_SUB("Data::PubSub::Shared::Int16::Sub", self);
2083 5 1 while (pubsub_int16_poll(sub, &value)) {
2086 0 5 PUSHMARK(SP);
2087 0 5 mXPUSHi((IV)value);
2090 5 0 FREETMPS; LEAVE;
2100 0 0 EXTRACT_SUB("Data::PubSub::Shared::Int16::Sub", self);
0 0 EXTRACT_SUB("Data::PubSub::Shared::Int16::Sub", self);
0 0 EXTRACT_SUB("Data::PubSub::Shared::Int16::Sub", self);
2105 0 0 max_count = (items > 1) ? (uint32_t)SvUV(ST(1)) : UINT32_MAX;
2106 0 0 while (max_count-- > 0 && pubsub_int16_poll(sub, &value))
0 0 while (max_count-- > 0 && pubsub_int16_poll(sub, &value))
2107 0 0 mXPUSHi((IV)value);
2114 0 0 EXTRACT_SUB("Data::PubSub::Shared::Int16::Sub", self);
0 0 EXTRACT_SUB("Data::PubSub::Shared::Int16::Sub", self);
0 0 EXTRACT_SUB("Data::PubSub::Shared::Int16::Sub", self);
2122 0 0 EXTRACT_SUB("Data::PubSub::Shared::Int16::Sub", self);
0 0 EXTRACT_SUB("Data::PubSub::Shared::Int16::Sub", self);
0 0 EXTRACT_SUB("Data::PubSub::Shared::Int16::Sub", self);
2124 0 0 RETVAL = sub->notify_fd;