… | |
… | |
1311 | const_iv (EFD_SEMAPHORE) |
1311 | const_iv (EFD_SEMAPHORE) |
1312 | |
1312 | |
1313 | const_iv (MFD_CLOEXEC) |
1313 | const_iv (MFD_CLOEXEC) |
1314 | const_iv (MFD_ALLOW_SEALING) |
1314 | const_iv (MFD_ALLOW_SEALING) |
1315 | const_iv (MFD_HUGETLB) |
1315 | const_iv (MFD_HUGETLB) |
|
|
1316 | const_iv (MFD_HUGETLB_2MB) |
|
|
1317 | const_iv (MFD_HUGETLB_1GB) |
1316 | |
1318 | |
1317 | const_iv (CLOCK_REALTIME) |
1319 | const_iv (CLOCK_REALTIME) |
1318 | const_iv (CLOCK_MONOTONIC) |
1320 | const_iv (CLOCK_MONOTONIC) |
1319 | const_iv (CLOCK_BOOTTIME) |
1321 | const_iv (CLOCK_BOOTTIME) |
1320 | const_iv (CLOCK_REALTIME_ALARM) |
1322 | const_iv (CLOCK_REALTIME_ALARM) |
… | |
… | |
2681 | |
2683 | |
2682 | int |
2684 | int |
2683 | pidfd_send_signal (SV *pidfh, int sig, SV *siginfo = &PL_sv_undef, unsigned int flags = 0) |
2685 | pidfd_send_signal (SV *pidfh, int sig, SV *siginfo = &PL_sv_undef, unsigned int flags = 0) |
2684 | PPCODE: |
2686 | PPCODE: |
2685 | { |
2687 | { |
2686 | #if HAVE_SIGINFO_T |
|
|
2687 | int res; |
2688 | int res; |
|
|
2689 | #if HAVE_SIGINFO_T |
2688 | siginfo_t si = { 0 }; |
2690 | siginfo_t si = { 0 }; |
2689 | |
2691 | |
2690 | if (SvOK (siginfo)) |
2692 | if (SvOK (siginfo)) |
2691 | { |
2693 | { |
2692 | HV *hv; |
2694 | HV *hv; |
… | |
… | |
2704 | if ((svp = hv_fetchs (hv, "value_ptr", 0))) si.si_value.sival_ptr = (void *)SvIV (*svp); |
2706 | if ((svp = hv_fetchs (hv, "value_ptr", 0))) si.si_value.sival_ptr = (void *)SvIV (*svp); |
2705 | } |
2707 | } |
2706 | |
2708 | |
2707 | /*GENDEF0_SYSCALL(pidfd_send_signal,424)*/ |
2709 | /*GENDEF0_SYSCALL(pidfd_send_signal,424)*/ |
2708 | res = syscall (SYS_pidfd_send_signal, s_fileno_croak (pidfh, 0), sig, SvOK (siginfo) ? &si : 0, flags); |
2710 | res = syscall (SYS_pidfd_send_signal, s_fileno_croak (pidfh, 0), sig, SvOK (siginfo) ? &si : 0, flags); |
2709 | #else |
2711 | #else |
2710 | res = (errno = ENOSYS, -1); |
2712 | res = (errno = ENOSYS, -1); |
2711 | #endif |
2713 | #endif |
2712 | |
2714 | |
2713 | XPUSHs (sv_2mortal (newSViv (res))); |
2715 | XPUSHs (sv_2mortal (newSViv (res))); |
2714 | } |
2716 | } |
2715 | |
2717 | |
2716 | void |
2718 | void |