Files
awslabs_aws-crt-php/ext/event_loop.c
T
Justin Boswell 7d47316a7d Implemented async callbacks to PHP regardless of thread model, Sigv4 signing (#24)
* Updated to get latest aws-crt-ffi

* Added implementation for signing_result

* Added main thread queue and callback queueing to signing process

* Updated to get support for date on signing_config_aws

* added date support to SigningConfigAWS, fixed up reference issues on http message signing

* Broke C code into separate files, moved common stuff to php_aws_crt.h

* Use a unity build to make PHP do the right thing with our lib

* Updated aws-crt-ffi to v0.1.3 to get sigv4 changes

* Added CRT::isAvailable for safe runtime detection of CRT

* Fixed up test resource safety, added tests to prove it

* Added CI jobs for every version of PHP on linux (#26)
2021-06-08 00:34:42 +00:00

49 lines
1.5 KiB
C

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include "php_aws_crt.h"
PHP_FUNCTION(aws_crt_event_loop_group_options_new) {
aws_php_parse_parameters_none();
aws_crt_event_loop_group_options *options = aws_crt_event_loop_group_options_new();
RETURN_LONG((zend_ulong)options);
}
PHP_FUNCTION(aws_crt_event_loop_group_options_release) {
zend_ulong php_options = 0;
aws_php_parse_parameters("l", &php_options);
aws_crt_event_loop_group_options *options = (void *)php_options;
aws_crt_event_loop_group_options_release(options);
}
PHP_FUNCTION(aws_crt_event_loop_group_options_set_max_threads) {
zend_ulong php_options = 0;
zend_ulong num_threads = 0;
aws_php_parse_parameters("ll", &php_options, &num_threads);
aws_crt_event_loop_group_options *options = (void *)php_options;
aws_crt_event_loop_group_options_set_max_threads(options, num_threads);
}
PHP_FUNCTION(aws_crt_event_loop_group_new) {
zend_ulong php_options = 0;
aws_php_parse_parameters("l", &php_options);
aws_crt_event_loop_group_options *options = (void *)php_options;
aws_crt_event_loop_group *elg = aws_crt_event_loop_group_new(options);
RETURN_LONG((zend_ulong)elg);
}
PHP_FUNCTION(aws_crt_event_loop_group_release) {
zend_ulong php_elg = 0;
aws_php_parse_parameters("l", &php_elg);
struct aws_event_loop_group *elg = (void *)php_elg;
aws_crt_event_loop_group_release(elg);
}