… | |
… | |
65 | # include <signal.h> |
65 | # include <signal.h> |
66 | # define EIO_STRUCT_DIRENT struct dirent |
66 | # define EIO_STRUCT_DIRENT struct dirent |
67 | |
67 | |
68 | #endif |
68 | #endif |
69 | |
69 | |
|
|
70 | /* perl stupidly overrides readdir and maybe others */ |
|
|
71 | /* with thread-unsafe versions, imagine that :( */ |
|
|
72 | #undef readdir |
|
|
73 | #undef opendir |
|
|
74 | #undef closedir |
|
|
75 | |
70 | #define EIO_STRUCT_STAT Stat_t |
76 | #define EIO_STRUCT_STAT Stat_t |
71 | |
77 | |
72 | /* use NV for 32 bit perls as it allows larger offsets */ |
78 | /* use NV for 32 bit perls as it allows larger offsets */ |
73 | #if IVSIZE >= 8 |
79 | #if IVSIZE >= 8 |
74 | # define SvVAL64 SvIV |
80 | # define SvVAL64 SvIV |
… | |
… | |
423 | } |
429 | } |
424 | } |
430 | } |
425 | |
431 | |
426 | static int poll_cb (void) |
432 | static int poll_cb (void) |
427 | { |
433 | { |
428 | int res; |
434 | for (;;) |
429 | |
|
|
430 | do |
|
|
431 | { |
435 | { |
432 | res = eio_poll (); |
436 | int res = eio_poll (); |
433 | |
437 | |
434 | if (res > 0) |
438 | if (res > 0) |
435 | croak (0); |
439 | croak (0); |
|
|
440 | |
|
|
441 | if (!max_outstanding || max_outstanding > eio_nreqs ()) |
|
|
442 | return res; |
|
|
443 | |
|
|
444 | poll_wait (); |
436 | } |
445 | } |
437 | while (max_outstanding && max_outstanding <= eio_nreqs ()); |
|
|
438 | |
|
|
439 | return res; |
|
|
440 | } |
446 | } |
441 | |
447 | |
442 | static void atfork_child (void) |
448 | static void atfork_child (void) |
443 | { |
449 | { |
444 | create_respipe (); |
450 | create_respipe (); |