polyphony 0.82 → 0.84.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitmodules +3 -0
- data/CHANGELOG.md +12 -0
- data/Gemfile.lock +1 -1
- data/Rakefile +14 -0
- data/ext/polyphony/backend_common.c +15 -10
- data/ext/polyphony/backend_common.h +5 -4
- data/ext/polyphony/backend_io_uring.c +128 -157
- data/ext/polyphony/backend_libev.c +148 -159
- data/ext/polyphony/extconf.rb +20 -1
- data/ext/polyphony/io_extensions.c +440 -0
- data/ext/polyphony/pipe.c +109 -0
- data/ext/polyphony/polyphony.c +5 -0
- data/ext/polyphony/polyphony.h +6 -0
- data/ext/polyphony/polyphony_ext.c +7 -2
- data/ext/polyphony/zlib_conf.rb +119 -0
- data/lib/polyphony/extensions/io.rb +20 -2
- data/lib/polyphony/extensions/pipe.rb +171 -0
- data/lib/polyphony/extensions.rb +1 -0
- data/lib/polyphony/version.rb +1 -1
- data/lib/polyphony.rb +4 -0
- data/test/helper.rb +4 -0
- data/test/test_backend.rb +3 -48
- data/test/test_global_api.rb +23 -23
- data/test/test_io.rb +391 -0
- data/test/test_pipe.rb +41 -0
- data/test/test_process_supervision.rb +1 -1
- data/test/test_socket.rb +1 -0
- metadata +7 -13
- data/ext/liburing/liburing/README.md +0 -4
- data/ext/liburing/liburing/barrier.h +0 -73
- data/ext/liburing/liburing/compat.h +0 -15
- data/ext/liburing/liburing/io_uring.h +0 -343
- data/ext/liburing/liburing.h +0 -585
- data/ext/liburing/queue.c +0 -333
- data/ext/liburing/register.c +0 -187
- data/ext/liburing/setup.c +0 -210
- data/ext/liburing/syscall.c +0 -54
- data/ext/liburing/syscall.h +0 -18
- data/ext/polyphony/liburing.c +0 -8
data/ext/liburing/syscall.c
DELETED
@@ -1,54 +0,0 @@
|
|
1
|
-
/* SPDX-License-Identifier: MIT */
|
2
|
-
/*
|
3
|
-
* Will go away once libc support is there
|
4
|
-
*/
|
5
|
-
#include <unistd.h>
|
6
|
-
#include <sys/syscall.h>
|
7
|
-
#include <sys/uio.h>
|
8
|
-
#include "liburing/compat.h"
|
9
|
-
#include "liburing/io_uring.h"
|
10
|
-
#include "syscall.h"
|
11
|
-
|
12
|
-
#ifdef __alpha__
|
13
|
-
/*
|
14
|
-
* alpha is the only exception, all other architectures
|
15
|
-
* have common numbers for new system calls.
|
16
|
-
*/
|
17
|
-
# ifndef __NR_io_uring_setup
|
18
|
-
# define __NR_io_uring_setup 535
|
19
|
-
# endif
|
20
|
-
# ifndef __NR_io_uring_enter
|
21
|
-
# define __NR_io_uring_enter 536
|
22
|
-
# endif
|
23
|
-
# ifndef __NR_io_uring_register
|
24
|
-
# define __NR_io_uring_register 537
|
25
|
-
# endif
|
26
|
-
#else /* !__alpha__ */
|
27
|
-
# ifndef __NR_io_uring_setup
|
28
|
-
# define __NR_io_uring_setup 425
|
29
|
-
# endif
|
30
|
-
# ifndef __NR_io_uring_enter
|
31
|
-
# define __NR_io_uring_enter 426
|
32
|
-
# endif
|
33
|
-
# ifndef __NR_io_uring_register
|
34
|
-
# define __NR_io_uring_register 427
|
35
|
-
# endif
|
36
|
-
#endif
|
37
|
-
|
38
|
-
int __sys_io_uring_register(int fd, unsigned opcode, const void *arg,
|
39
|
-
unsigned nr_args)
|
40
|
-
{
|
41
|
-
return syscall(__NR_io_uring_register, fd, opcode, arg, nr_args);
|
42
|
-
}
|
43
|
-
|
44
|
-
int __sys_io_uring_setup(unsigned entries, struct io_uring_params *p)
|
45
|
-
{
|
46
|
-
return syscall(__NR_io_uring_setup, entries, p);
|
47
|
-
}
|
48
|
-
|
49
|
-
int __sys_io_uring_enter(int fd, unsigned to_submit, unsigned min_complete,
|
50
|
-
unsigned flags, sigset_t *sig)
|
51
|
-
{
|
52
|
-
return syscall(__NR_io_uring_enter, fd, to_submit, min_complete,
|
53
|
-
flags, sig, _NSIG / 8);
|
54
|
-
}
|
data/ext/liburing/syscall.h
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
/* SPDX-License-Identifier: MIT */
|
2
|
-
#ifndef LIBURING_SYSCALL_H
|
3
|
-
#define LIBURING_SYSCALL_H
|
4
|
-
|
5
|
-
#include <signal.h>
|
6
|
-
|
7
|
-
struct io_uring_params;
|
8
|
-
|
9
|
-
/*
|
10
|
-
* System calls
|
11
|
-
*/
|
12
|
-
extern int __sys_io_uring_setup(unsigned entries, struct io_uring_params *p);
|
13
|
-
extern int __sys_io_uring_enter(int fd, unsigned to_submit,
|
14
|
-
unsigned min_complete, unsigned flags, sigset_t *sig);
|
15
|
-
extern int __sys_io_uring_register(int fd, unsigned int opcode, const void *arg,
|
16
|
-
unsigned int nr_args);
|
17
|
-
|
18
|
-
#endif
|