… | |
… | |
27 | # ifndef IS_PADCONST |
27 | # ifndef IS_PADCONST |
28 | # define IS_PADCONST(v) 0 |
28 | # define IS_PADCONST(v) 0 |
29 | # endif |
29 | # endif |
30 | #endif |
30 | #endif |
31 | |
31 | |
|
|
32 | #include <errno.h> |
32 | #include <signal.h> |
33 | #include <signal.h> |
33 | |
34 | |
34 | #ifdef HAVE_MMAP |
35 | #ifdef HAVE_MMAP |
35 | # include <unistd.h> |
36 | # include <unistd.h> |
36 | # include <sys/mman.h> |
37 | # include <sys/mman.h> |
… | |
… | |
1146 | cede(...) |
1147 | cede(...) |
1147 | PROTOTYPE: |
1148 | PROTOTYPE: |
1148 | CODE: |
1149 | CODE: |
1149 | api_cede (); |
1150 | api_cede (); |
1150 | |
1151 | |
|
|
1152 | # and these are hacks |
|
|
1153 | SV * |
|
|
1154 | _aio_get_state () |
|
|
1155 | CODE: |
|
|
1156 | { |
|
|
1157 | struct { |
|
|
1158 | int errorno; |
|
|
1159 | int laststype; |
|
|
1160 | int laststatval; |
|
|
1161 | Stat_t statcache; |
|
|
1162 | } data; |
|
|
1163 | |
|
|
1164 | data.errorno = errno; |
|
|
1165 | data.laststype = PL_laststype; |
|
|
1166 | data.laststatval = PL_laststatval; |
|
|
1167 | data.statcache = PL_statcache; |
|
|
1168 | |
|
|
1169 | RETVAL = newSVpvn ((char *)&data, sizeof data); |
|
|
1170 | } |
|
|
1171 | OUTPUT: |
|
|
1172 | RETVAL |
|
|
1173 | |
|
|
1174 | void |
|
|
1175 | _aio_set_state (char *data_) |
|
|
1176 | PROTOTYPE: $ |
|
|
1177 | CODE: |
|
|
1178 | { |
|
|
1179 | struct { |
|
|
1180 | int errorno; |
|
|
1181 | int laststype; |
|
|
1182 | int laststatval; |
|
|
1183 | Stat_t statcache; |
|
|
1184 | } *data = (void *)data_; |
|
|
1185 | |
|
|
1186 | errno = data->errorno; |
|
|
1187 | PL_laststype = data->laststype; |
|
|
1188 | PL_laststatval = data->laststatval; |
|
|
1189 | PL_statcache = data->statcache; |
|
|
1190 | } |