Skip to content

Commit 1378608

Browse files
committed
Introduce Io\Poll userspace API
It makes use of internal polling API and exposes its functionality to user space.
1 parent f599d65 commit 1378608

30 files changed

+2442
-2
lines changed

ext/reflection/tests/ReflectionExtension_getClassNames_basic.phpt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,24 @@ foreach ($classNames as $className) {
1414
--EXPECT--
1515
AssertionError
1616
Directory
17+
Io\IoException
18+
Io\Poll\Backend
19+
Io\Poll\BackendUnavailableException
20+
Io\Poll\Context
21+
Io\Poll\Event
22+
Io\Poll\FailedContextInitializationException
23+
Io\Poll\FailedHandleAddException
24+
Io\Poll\FailedPollOperationException
25+
Io\Poll\FailedPollWaitException
26+
Io\Poll\FailedWatcherModificationException
27+
Io\Poll\Handle
28+
Io\Poll\HandleAlreadyWatchedException
29+
Io\Poll\InactiveWatcherException
30+
Io\Poll\InvalidHandleException
31+
Io\Poll\PollException
32+
Io\Poll\Watcher
1733
RoundingMode
1834
StreamBucket
35+
StreamPollHandle
1936
__PHP_Incomplete_Class
2037
php_user_filter

ext/standard/basic_functions.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@ PHP_MINIT_FUNCTION(basic) /* {{{ */
303303
BASIC_MINIT_SUBMODULE(browscap)
304304
BASIC_MINIT_SUBMODULE(standard_filters)
305305
BASIC_MINIT_SUBMODULE(user_filters)
306+
BASIC_MINIT_SUBMODULE(poll)
306307
BASIC_MINIT_SUBMODULE(password)
307308
BASIC_MINIT_SUBMODULE(image)
308309

ext/standard/basic_functions.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ PHP_MINFO_FUNCTION(basic);
4444

4545
ZEND_API void php_get_highlight_struct(zend_syntax_highlighter_ini *syntax_highlighter_ini);
4646

47+
PHP_MINIT_FUNCTION(poll);
4748
PHP_MINIT_FUNCTION(user_filters);
4849
PHP_RSHUTDOWN_FUNCTION(user_filters);
4950
PHP_RSHUTDOWN_FUNCTION(browscap);

ext/standard/config.m4

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,7 @@ PHP_NEW_EXTENSION([standard], m4_normalize([
418418
image.c
419419
incomplete_class.c
420420
info.c
421+
io_poll.c
421422
iptc.c
422423
levenshtein.c
423424
libavifinfo/avifinfo.c

ext/standard/config.w32

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,15 @@ EXTENSION("standard", "array.c base64.c basic_functions.c browscap.c \
2828
crypt_sha512.c php_crypt_r.c " + (TARGET_ARCH != 'arm64'? " crc32_x86.c" : "") + " \
2929
datetime.c dir.c dl.c dns.c dns_win32.c exec.c \
3030
file.c filestat.c formatted_print.c fsock.c head.c html.c image.c \
31-
info.c iptc.c link.c mail.c math.c md5.c metaphone.c microtime.c \
31+
info.c io_poll.c iptc.c link.c mail.c math.c md5.c metaphone.c microtime.c \
3232
net.c pack.c pageinfo.c quot_print.c soundex.c \
3333
string.c scanf.c syslog.c type.c uniqid.c url.c var.c \
3434
versioning.c assert.c strnatcmp.c levenshtein.c incomplete_class.c \
3535
url_scanner_ex.c ftp_fopen_wrapper.c http_fopen_wrapper.c \
3636
php_fopen_wrapper.c credits.c css.c var_unserializer.c ftok.c sha1.c \
3737
user_filters.c uuencode.c filters.c proc_open.c password.c \
38-
streamsfuncs.c http.c flock_compat.c hrtime.c", false /* never shared */,
38+
streamsfuncs.c http.c flock_compat.c hrtime.c",
39+
false /* never shared */,
3940
'/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1');
4041
ADD_SOURCES("ext/standard/libavifinfo", "avifinfo.c", "standard");
4142
PHP_STANDARD = "yes";

0 commit comments

Comments
 (0)