ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/IO-AIO/AIO.xs
(Generate patch)

Comparing IO-AIO/AIO.xs (file contents):
Revision 1.289 by root, Mon Jan 4 22:19:06 2021 UTC vs.
Revision 1.294 by root, Sat Apr 9 19:34:05 2022 UTC

1203 const_iv (MAP_NONBLOCK) 1203 const_iv (MAP_NONBLOCK)
1204 const_iv (MAP_GROWSDOWN) 1204 const_iv (MAP_GROWSDOWN)
1205 const_iv (MAP_32BIT) 1205 const_iv (MAP_32BIT)
1206 const_iv (MAP_HUGETLB) 1206 const_iv (MAP_HUGETLB)
1207 const_iv (MAP_STACK) 1207 const_iv (MAP_STACK)
1208 const_iv (MAP_FIXED_NOREPLACE)
1209 const_iv (MAP_SHARED_VALIDATE)
1210 const_iv (MAP_SYNC)
1211 const_iv (MAP_UNINITIALIZED)
1208 1212
1209 const_iv (MREMAP_MAYMOVE) 1213 const_iv (MREMAP_MAYMOVE)
1210 const_iv (MREMAP_FIXED) 1214 const_iv (MREMAP_FIXED)
1211 1215
1212 const_iv (MSG_CMSG_CLOEXEC) 1216 const_iv (MSG_CMSG_CLOEXEC)
1307 const_iv (EFD_SEMAPHORE) 1311 const_iv (EFD_SEMAPHORE)
1308 1312
1309 const_iv (MFD_CLOEXEC) 1313 const_iv (MFD_CLOEXEC)
1310 const_iv (MFD_ALLOW_SEALING) 1314 const_iv (MFD_ALLOW_SEALING)
1311 const_iv (MFD_HUGETLB) 1315 const_iv (MFD_HUGETLB)
1316 const_iv (MFD_HUGETLB_2MB)
1317 const_iv (MFD_HUGETLB_1GB)
1312 1318
1313 const_iv (CLOCK_REALTIME) 1319 const_iv (CLOCK_REALTIME)
1314 const_iv (CLOCK_MONOTONIC) 1320 const_iv (CLOCK_MONOTONIC)
1315 const_iv (CLOCK_BOOTTIME) 1321 const_iv (CLOCK_BOOTTIME)
1316 const_iv (CLOCK_REALTIME_ALARM) 1322 const_iv (CLOCK_REALTIME_ALARM)
2678int 2684int
2679pidfd_send_signal (SV *pidfh, int sig, SV *siginfo = &PL_sv_undef, unsigned int flags = 0) 2685pidfd_send_signal (SV *pidfh, int sig, SV *siginfo = &PL_sv_undef, unsigned int flags = 0)
2680 PPCODE: 2686 PPCODE:
2681{ 2687{
2682 int res; 2688 int res;
2689#if HAVE_SIGINFO_T
2683 siginfo_t si = { 0 }; 2690 siginfo_t si = { 0 };
2684 2691
2685 if (SvOK (siginfo)) 2692 if (SvOK (siginfo))
2686 { 2693 {
2687 HV *hv; 2694 HV *hv;
2688 SV **svp; 2695 SV **svp;
2689 2696
2690 if (!SvROK (siginfo) || SvTYPE (SvRV (siginfo)) != SVt_PVHV) 2697 if (!SvROK (siginfo) || SvTYPE (SvRV (siginfo)) != SVt_PVHV)
2691 croak ("siginfo argument must be a hashref code, pid, uid and value_int or value_ptr members, caught"); 2698 croak ("siginfo argument must be a hashref with 'code', 'pid', 'uid' and 'value_int' or 'value_ptr' members, caught");
2692 2699
2693 hv = (HV *)SvRV (siginfo); 2700 hv = (HV *)SvRV (siginfo);
2694 2701
2695 if ((svp = hv_fetchs (hv, "code" , 0))) si.si_code = SvIV (*svp); 2702 if ((svp = hv_fetchs (hv, "code" , 0))) si.si_code = SvIV (*svp);
2696 if ((svp = hv_fetchs (hv, "pid" , 0))) si.si_pid = SvIV (*svp); 2703 if ((svp = hv_fetchs (hv, "pid" , 0))) si.si_pid = SvIV (*svp);
2699 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);
2700 } 2707 }
2701 2708
2702 /*GENDEF0_SYSCALL(pidfd_send_signal,424)*/ 2709 /*GENDEF0_SYSCALL(pidfd_send_signal,424)*/
2703 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);
2711#else
2712 res = (errno = ENOSYS, -1);
2713#endif
2704 2714
2705 XPUSHs (sv_2mortal (newSViv (res))); 2715 XPUSHs (sv_2mortal (newSViv (res)));
2706} 2716}
2707 2717
2708void 2718void

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines