… | |
… | |
208 | #endif |
208 | #endif |
209 | #ifndef ST_RELATIME |
209 | #ifndef ST_RELATIME |
210 | # define ST_RELATIME 0 |
210 | # define ST_RELATIME 0 |
211 | #endif |
211 | #endif |
212 | |
212 | |
|
|
213 | #ifndef S_IFIFO |
|
|
214 | # define S_IFIFO 0 |
|
|
215 | #endif |
|
|
216 | #ifndef S_IFCHR |
|
|
217 | # define S_IFCHR 0 |
|
|
218 | #endif |
|
|
219 | #ifndef S_IFBLK |
|
|
220 | # define S_IFBLK 0 |
|
|
221 | #endif |
|
|
222 | #ifndef S_IFLNK |
|
|
223 | # define S_IFLNK 0 |
|
|
224 | #endif |
|
|
225 | #ifndef S_IFREG |
|
|
226 | # define S_IFREG 0 |
|
|
227 | #endif |
|
|
228 | #ifndef S_IFDIR |
|
|
229 | # define S_IFDIR 0 |
|
|
230 | #endif |
|
|
231 | #ifndef S_IFWHT |
|
|
232 | # define S_IFWHT 0 |
|
|
233 | #endif |
|
|
234 | #ifndef S_IFSOCK |
|
|
235 | # define S_IFSOCK 0 |
|
|
236 | #endif |
|
|
237 | |
213 | #ifndef MAP_ANONYMOUS |
238 | #ifndef MAP_ANONYMOUS |
214 | # ifdef MAP_ANON |
239 | # ifdef MAP_ANON |
215 | # define MAP_ANONYMOUS MAP_ANON |
240 | # define MAP_ANONYMOUS MAP_ANON |
216 | # else |
241 | # else |
217 | # define MAP_ANONYMOUS MAP_FIXED /* and hope this fails */ |
242 | # define MAP_ANONYMOUS MAP_FIXED /* and hope this fails */ |
… | |
… | |
229 | #ifndef MAP_POPULATE |
254 | #ifndef MAP_POPULATE |
230 | # define MAP_POPULATE 0 |
255 | # define MAP_POPULATE 0 |
231 | #endif |
256 | #endif |
232 | #ifndef MAP_NONBLOCK |
257 | #ifndef MAP_NONBLOCK |
233 | # define MAP_NONBLOCK 0 |
258 | # define MAP_NONBLOCK 0 |
|
|
259 | #endif |
|
|
260 | |
|
|
261 | #ifndef makedev |
|
|
262 | # define makedev(maj,min) (((maj) << 8) | (min)) |
|
|
263 | #endif |
|
|
264 | #ifndef major |
|
|
265 | # define major(dev) ((dev) >> 8) |
|
|
266 | #endif |
|
|
267 | #ifndef minor |
|
|
268 | # define minor(dev) ((dev) & 0xff) |
234 | #endif |
269 | #endif |
235 | |
270 | |
236 | #ifndef PAGESIZE |
271 | #ifndef PAGESIZE |
237 | # define PAGESIZE sysconf (_SC_PAGESIZE) |
272 | # define PAGESIZE sysconf (_SC_PAGESIZE) |
238 | #endif |
273 | #endif |
… | |
… | |
729 | const_iv (O_RDWR) |
764 | const_iv (O_RDWR) |
730 | const_iv (O_CREAT) |
765 | const_iv (O_CREAT) |
731 | const_iv (O_TRUNC) |
766 | const_iv (O_TRUNC) |
732 | const_iv (O_EXCL) |
767 | const_iv (O_EXCL) |
733 | const_iv (O_APPEND) |
768 | const_iv (O_APPEND) |
734 | #ifndef _WIN32 |
769 | |
735 | const_iv (S_IFIFO) |
770 | const_iv (S_IFIFO) |
736 | #endif |
771 | const_iv (S_IFCHR) |
|
|
772 | const_iv (S_IFBLK) |
|
|
773 | const_iv (S_IFLNK) |
|
|
774 | const_iv (S_IFREG) |
|
|
775 | const_iv (S_IFDIR) |
|
|
776 | const_iv (S_IFWHT) |
|
|
777 | const_iv (S_IFSOCK) |
|
|
778 | const_iv (S_IFMT) |
|
|
779 | |
737 | const_niv (FADV_NORMAL , POSIX_FADV_NORMAL) |
780 | const_niv (FADV_NORMAL , POSIX_FADV_NORMAL) |
738 | const_niv (FADV_SEQUENTIAL, POSIX_FADV_SEQUENTIAL) |
781 | const_niv (FADV_SEQUENTIAL, POSIX_FADV_SEQUENTIAL) |
739 | const_niv (FADV_RANDOM , POSIX_FADV_RANDOM) |
782 | const_niv (FADV_RANDOM , POSIX_FADV_RANDOM) |
740 | const_niv (FADV_NOREUSE , POSIX_FADV_NOREUSE) |
783 | const_niv (FADV_NOREUSE , POSIX_FADV_NOREUSE) |
741 | const_niv (FADV_WILLNEED , POSIX_FADV_WILLNEED) |
784 | const_niv (FADV_WILLNEED , POSIX_FADV_WILLNEED) |
… | |
… | |
823 | /* atfork child called in fifo order, so before eio's handler */ |
866 | /* atfork child called in fifo order, so before eio's handler */ |
824 | X_THREAD_ATFORK (0, 0, atfork_child); |
867 | X_THREAD_ATFORK (0, 0, atfork_child); |
825 | } |
868 | } |
826 | |
869 | |
827 | void |
870 | void |
828 | max_poll_reqs (int nreqs) |
871 | max_poll_reqs (unsigned int nreqs) |
829 | PROTOTYPE: $ |
872 | PROTOTYPE: $ |
830 | CODE: |
873 | CODE: |
831 | eio_set_max_poll_reqs (nreqs); |
874 | eio_set_max_poll_reqs (nreqs); |
832 | |
875 | |
833 | void |
876 | void |
… | |
… | |
835 | PROTOTYPE: $ |
878 | PROTOTYPE: $ |
836 | CODE: |
879 | CODE: |
837 | eio_set_max_poll_time (nseconds); |
880 | eio_set_max_poll_time (nseconds); |
838 | |
881 | |
839 | void |
882 | void |
840 | min_parallel (int nthreads) |
883 | min_parallel (unsigned int nthreads) |
841 | PROTOTYPE: $ |
884 | PROTOTYPE: $ |
842 | CODE: |
885 | CODE: |
843 | eio_set_min_parallel (nthreads); |
886 | eio_set_min_parallel (nthreads); |
844 | |
887 | |
845 | void |
888 | void |
846 | max_parallel (int nthreads) |
889 | max_parallel (unsigned int nthreads) |
847 | PROTOTYPE: $ |
890 | PROTOTYPE: $ |
848 | CODE: |
891 | CODE: |
849 | eio_set_max_parallel (nthreads); |
892 | eio_set_max_parallel (nthreads); |
850 | |
893 | |
851 | void |
894 | void |
852 | max_idle (int nthreads) |
895 | max_idle (unsigned int nthreads) |
853 | PROTOTYPE: $ |
896 | PROTOTYPE: $ |
854 | CODE: |
897 | CODE: |
855 | eio_set_max_idle (nthreads); |
898 | eio_set_max_idle (nthreads); |
856 | |
899 | |
857 | void |
900 | void |
|
|
901 | idle_timeout (unsigned int seconds) |
|
|
902 | PROTOTYPE: $ |
|
|
903 | CODE: |
|
|
904 | eio_set_idle_timeout (seconds); |
|
|
905 | |
|
|
906 | void |
858 | max_outstanding (int maxreqs) |
907 | max_outstanding (unsigned int maxreqs) |
859 | PROTOTYPE: $ |
908 | PROTOTYPE: $ |
860 | CODE: |
909 | CODE: |
861 | max_outstanding = maxreqs; |
910 | max_outstanding = maxreqs; |
862 | |
911 | |
863 | void |
912 | void |
… | |
… | |
1063 | } |
1112 | } |
1064 | |
1113 | |
1065 | REQ_SEND; |
1114 | REQ_SEND; |
1066 | } |
1115 | } |
1067 | |
1116 | |
|
|
1117 | UV |
|
|
1118 | major (UV dev) |
|
|
1119 | ALIAS: |
|
|
1120 | minor = 1 |
|
|
1121 | CODE: |
|
|
1122 | RETVAL = ix ? major (dev) : minor (dev); |
|
|
1123 | OUTPUT: |
|
|
1124 | RETVAL |
|
|
1125 | |
|
|
1126 | UV |
|
|
1127 | makedev (UV maj, UV min) |
|
|
1128 | CODE: |
|
|
1129 | RETVAL = makedev (maj, min); |
|
|
1130 | OUTPUT: |
|
|
1131 | RETVAL |
|
|
1132 | |
1068 | void |
1133 | void |
1069 | aio_utime (SV8 *fh_or_path, SV *atime, SV *mtime, SV *callback=&PL_sv_undef) |
1134 | aio_utime (SV8 *fh_or_path, SV *atime, SV *mtime, SV *callback=&PL_sv_undef) |
1070 | PPCODE: |
1135 | PPCODE: |
1071 | { |
1136 | { |
1072 | dREQ; |
1137 | dREQ; |