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.285 by root, Tue Dec 29 15:16:28 2020 UTC vs.
Revision 1.294 by root, Sat Apr 9 19:34:05 2022 UTC

84 84
85#else 85#else
86 86
87 #include <sys/time.h> 87 #include <sys/time.h>
88 #include <sys/select.h> 88 #include <sys/select.h>
89 #include <sys/wait.h>
89 #include <unistd.h> 90 #include <unistd.h>
90 #include <utime.h> 91 #include <utime.h>
91 #include <signal.h> 92 #include <signal.h>
92 93
93 #define EIO_STRUCT_STAT Stat_t 94 #define EIO_STRUCT_STAT Stat_t
224# undef PAGESIZE 225# undef PAGESIZE
225#endif 226#endif
226 227
227#if PAGESIZE <= 0 228#if PAGESIZE <= 0
228# define PAGESIZE sysconf (_SC_PAGESIZE) 229# define PAGESIZE sysconf (_SC_PAGESIZE)
230#endif
231
232/* solaris perl seems to declare a wrong syscall function that clashes with system includes */
233#ifdef __sun
234# undef HAVE_SYSCALL
229#endif 235#endif
230 236
231#if HAVE_SYSCALL 237#if HAVE_SYSCALL
232#include <sys/syscall.h> 238#include <sys/syscall.h>
233#else 239#else
1197 const_iv (MAP_NONBLOCK) 1203 const_iv (MAP_NONBLOCK)
1198 const_iv (MAP_GROWSDOWN) 1204 const_iv (MAP_GROWSDOWN)
1199 const_iv (MAP_32BIT) 1205 const_iv (MAP_32BIT)
1200 const_iv (MAP_HUGETLB) 1206 const_iv (MAP_HUGETLB)
1201 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)
1202 1212
1203 const_iv (MREMAP_MAYMOVE) 1213 const_iv (MREMAP_MAYMOVE)
1204 const_iv (MREMAP_FIXED) 1214 const_iv (MREMAP_FIXED)
1205 1215
1206 const_iv (MSG_CMSG_CLOEXEC) 1216 const_iv (MSG_CMSG_CLOEXEC)
1301 const_iv (EFD_SEMAPHORE) 1311 const_iv (EFD_SEMAPHORE)
1302 1312
1303 const_iv (MFD_CLOEXEC) 1313 const_iv (MFD_CLOEXEC)
1304 const_iv (MFD_ALLOW_SEALING) 1314 const_iv (MFD_ALLOW_SEALING)
1305 const_iv (MFD_HUGETLB) 1315 const_iv (MFD_HUGETLB)
1316 const_iv (MFD_HUGETLB_2MB)
1317 const_iv (MFD_HUGETLB_1GB)
1306 1318
1307 const_iv (CLOCK_REALTIME) 1319 const_iv (CLOCK_REALTIME)
1308 const_iv (CLOCK_MONOTONIC) 1320 const_iv (CLOCK_MONOTONIC)
1309 const_iv (CLOCK_BOOTTIME) 1321 const_iv (CLOCK_BOOTTIME)
1310 const_iv (CLOCK_REALTIME_ALARM) 1322 const_iv (CLOCK_REALTIME_ALARM)
1350 const_iv (AT_STATX_DONT_SYNC) 1362 const_iv (AT_STATX_DONT_SYNC)
1351 const_iv (AT_RECURSIVE) 1363 const_iv (AT_RECURSIVE)
1352 1364
1353 const_iv (OPEN_TREE_CLONE) 1365 const_iv (OPEN_TREE_CLONE)
1354 1366
1367 const_iv (FSOPEN_CLOEXEC)
1368
1369 const_iv (FSPICK_CLOEXEC)
1370 const_iv (FSPICK_SYMLINK_NOFOLLOW)
1371 const_iv (FSPICK_NO_AUTOMOUNT)
1372 const_iv (FSPICK_EMPTY_PATH)
1373
1355 const_iv (MOVE_MOUNT_F_SYMLINKS) 1374 const_iv (MOVE_MOUNT_F_SYMLINKS)
1356 const_iv (MOVE_MOUNT_F_AUTOMOUNTS) 1375 const_iv (MOVE_MOUNT_F_AUTOMOUNTS)
1357 const_iv (MOVE_MOUNT_F_EMPTY_PATH) 1376 const_iv (MOVE_MOUNT_F_EMPTY_PATH)
1358 const_iv (MOVE_MOUNT_T_SYMLINKS) 1377 const_iv (MOVE_MOUNT_T_SYMLINKS)
1359 const_iv (MOVE_MOUNT_T_AUTOMOUNTS) 1378 const_iv (MOVE_MOUNT_T_AUTOMOUNTS)
1360 const_iv (MOVE_MOUNT_T_EMPTY_PATH) 1379 const_iv (MOVE_MOUNT_T_EMPTY_PATH)
1380
1381 /* waitid */
1382 const_iv (P_PID)
1383 const_iv (P_PIDFD)
1384 const_iv (P_PGID)
1385 const_iv (P_ALL)
1386
1387 const_iv (FSCONFIG_SET_FLAG)
1388 const_iv (FSCONFIG_SET_STRING)
1389 const_iv (FSCONFIG_SET_BINARY)
1390 const_iv (FSCONFIG_SET_PATH)
1391 const_iv (FSCONFIG_SET_PATH_EMPTY)
1392 const_iv (FSCONFIG_SET_FD)
1393 const_iv (FSCONFIG_CMD_CREATE)
1394 const_iv (FSCONFIG_CMD_RECONFIGURE)
1395
1396 const_iv (MOUNT_ATTR_RDONLY)
1397 const_iv (MOUNT_ATTR_NOSUID)
1398 const_iv (MOUNT_ATTR_NODEV)
1399 const_iv (MOUNT_ATTR_NOEXEC)
1400 const_iv (MOUNT_ATTR__ATIME)
1401 const_iv (MOUNT_ATTR_RELATIME)
1402 const_iv (MOUNT_ATTR_NOATIME)
1403 const_iv (MOUNT_ATTR_STRICTATIME)
1404 const_iv (MOUNT_ATTR_NODIRATIME)
1361 1405
1362 /* these are libeio constants, and are independent of gendef0 */ 1406 /* these are libeio constants, and are independent of gendef0 */
1363 const_eio (SEEK_SET) 1407 const_eio (SEEK_SET)
1364 const_eio (SEEK_CUR) 1408 const_eio (SEEK_CUR)
1365 const_eio (SEEK_END) 1409 const_eio (SEEK_END)
2640int 2684int
2641pidfd_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)
2642 PPCODE: 2686 PPCODE:
2643{ 2687{
2644 int res; 2688 int res;
2689#if HAVE_SIGINFO_T
2645 siginfo_t si = { 0 }; 2690 siginfo_t si = { 0 };
2646 2691
2647 if (SvOK (siginfo)) 2692 if (SvOK (siginfo))
2648 { 2693 {
2649 HV *hv; 2694 HV *hv;
2650 SV **svp; 2695 SV **svp;
2651 2696
2652 if (!SvROK (siginfo) || SvTYPE (SvRV (siginfo)) != SVt_PVHV) 2697 if (!SvROK (siginfo) || SvTYPE (SvRV (siginfo)) != SVt_PVHV)
2653 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");
2654 2699
2655 hv = (HV *)SvRV (siginfo); 2700 hv = (HV *)SvRV (siginfo);
2656 2701
2657 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);
2658 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);
2661 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);
2662 } 2707 }
2663 2708
2664 /*GENDEF0_SYSCALL(pidfd_send_signal,424)*/ 2709 /*GENDEF0_SYSCALL(pidfd_send_signal,424)*/
2665 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
2666 2714
2667 XPUSHs (sv_2mortal (newSViv (res))); 2715 XPUSHs (sv_2mortal (newSViv (res)));
2668} 2716}
2669 2717
2670void 2718void

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines