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.287 by root, Tue Dec 29 15:28:02 2020 UTC vs.
Revision 1.293 by root, Tue Jul 27 18:46:06 2021 UTC

227 227
228#if PAGESIZE <= 0 228#if PAGESIZE <= 0
229# define PAGESIZE sysconf (_SC_PAGESIZE) 229# define PAGESIZE sysconf (_SC_PAGESIZE)
230#endif 230#endif
231 231
232/* solaris perl seems to declare a wrong syscall function that clashes with system includes */
233#ifdef __sun
234# undef HAVE_SYSCALL
235#endif
236
232#if HAVE_SYSCALL 237#if HAVE_SYSCALL
233#include <sys/syscall.h> 238#include <sys/syscall.h>
234#else 239#else
235# define syscall(nr,...) (errno = ENOSYS, -1) 240# define syscall(nr,...) (errno = ENOSYS, -1)
236#endif 241#endif
1198 const_iv (MAP_NONBLOCK) 1203 const_iv (MAP_NONBLOCK)
1199 const_iv (MAP_GROWSDOWN) 1204 const_iv (MAP_GROWSDOWN)
1200 const_iv (MAP_32BIT) 1205 const_iv (MAP_32BIT)
1201 const_iv (MAP_HUGETLB) 1206 const_iv (MAP_HUGETLB)
1202 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)
1203 1212
1204 const_iv (MREMAP_MAYMOVE) 1213 const_iv (MREMAP_MAYMOVE)
1205 const_iv (MREMAP_FIXED) 1214 const_iv (MREMAP_FIXED)
1206 1215
1207 const_iv (MSG_CMSG_CLOEXEC) 1216 const_iv (MSG_CMSG_CLOEXEC)
1371 const_iv (P_PID) 1380 const_iv (P_PID)
1372 const_iv (P_PIDFD) 1381 const_iv (P_PIDFD)
1373 const_iv (P_PGID) 1382 const_iv (P_PGID)
1374 const_iv (P_ALL) 1383 const_iv (P_ALL)
1375 1384
1385 const_iv (FSCONFIG_SET_FLAG)
1386 const_iv (FSCONFIG_SET_STRING)
1387 const_iv (FSCONFIG_SET_BINARY)
1388 const_iv (FSCONFIG_SET_PATH)
1389 const_iv (FSCONFIG_SET_PATH_EMPTY)
1390 const_iv (FSCONFIG_SET_FD)
1391 const_iv (FSCONFIG_CMD_CREATE)
1392 const_iv (FSCONFIG_CMD_RECONFIGURE)
1393
1394 const_iv (MOUNT_ATTR_RDONLY)
1395 const_iv (MOUNT_ATTR_NOSUID)
1396 const_iv (MOUNT_ATTR_NODEV)
1397 const_iv (MOUNT_ATTR_NOEXEC)
1398 const_iv (MOUNT_ATTR__ATIME)
1399 const_iv (MOUNT_ATTR_RELATIME)
1400 const_iv (MOUNT_ATTR_NOATIME)
1401 const_iv (MOUNT_ATTR_STRICTATIME)
1402 const_iv (MOUNT_ATTR_NODIRATIME)
1403
1376 /* these are libeio constants, and are independent of gendef0 */ 1404 /* these are libeio constants, and are independent of gendef0 */
1377 const_eio (SEEK_SET) 1405 const_eio (SEEK_SET)
1378 const_eio (SEEK_CUR) 1406 const_eio (SEEK_CUR)
1379 const_eio (SEEK_END) 1407 const_eio (SEEK_END)
1380 1408
2654int 2682int
2655pidfd_send_signal (SV *pidfh, int sig, SV *siginfo = &PL_sv_undef, unsigned int flags = 0) 2683pidfd_send_signal (SV *pidfh, int sig, SV *siginfo = &PL_sv_undef, unsigned int flags = 0)
2656 PPCODE: 2684 PPCODE:
2657{ 2685{
2658 int res; 2686 int res;
2687#if HAVE_SIGINFO_T
2659 siginfo_t si = { 0 }; 2688 siginfo_t si = { 0 };
2660 2689
2661 if (SvOK (siginfo)) 2690 if (SvOK (siginfo))
2662 { 2691 {
2663 HV *hv; 2692 HV *hv;
2664 SV **svp; 2693 SV **svp;
2665 2694
2666 if (!SvROK (siginfo) || SvTYPE (SvRV (siginfo)) != SVt_PVHV) 2695 if (!SvROK (siginfo) || SvTYPE (SvRV (siginfo)) != SVt_PVHV)
2667 croak ("siginfo argument must be a hashref code, pid, uid and value_int or value_ptr members, caught"); 2696 croak ("siginfo argument must be a hashref with 'code', 'pid', 'uid' and 'value_int' or 'value_ptr' members, caught");
2668 2697
2669 hv = (HV *)SvRV (siginfo); 2698 hv = (HV *)SvRV (siginfo);
2670 2699
2671 if ((svp = hv_fetchs (hv, "code" , 0))) si.si_code = SvIV (*svp); 2700 if ((svp = hv_fetchs (hv, "code" , 0))) si.si_code = SvIV (*svp);
2672 if ((svp = hv_fetchs (hv, "pid" , 0))) si.si_pid = SvIV (*svp); 2701 if ((svp = hv_fetchs (hv, "pid" , 0))) si.si_pid = SvIV (*svp);
2675 if ((svp = hv_fetchs (hv, "value_ptr", 0))) si.si_value.sival_ptr = (void *)SvIV (*svp); 2704 if ((svp = hv_fetchs (hv, "value_ptr", 0))) si.si_value.sival_ptr = (void *)SvIV (*svp);
2676 } 2705 }
2677 2706
2678 /*GENDEF0_SYSCALL(pidfd_send_signal,424)*/ 2707 /*GENDEF0_SYSCALL(pidfd_send_signal,424)*/
2679 res = syscall (SYS_pidfd_send_signal, s_fileno_croak (pidfh, 0), sig, SvOK (siginfo) ? &si : 0, flags); 2708 res = syscall (SYS_pidfd_send_signal, s_fileno_croak (pidfh, 0), sig, SvOK (siginfo) ? &si : 0, flags);
2709#else
2710 res = (errno = ENOSYS, -1);
2711#endif
2680 2712
2681 XPUSHs (sv_2mortal (newSViv (res))); 2713 XPUSHs (sv_2mortal (newSViv (res)));
2682} 2714}
2683 2715
2684void 2716void

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines