Commit Graph

711 Commits

Author SHA1 Message Date
zhengshuxin
7eed42a74a fixed one bug in sync_timer.c for waiting with timeout 2022-12-26 18:49:24 +08:00
zhengshuxin
0a06559547 just optimize codes 2022-12-25 16:54:14 +08:00
zhengshuxin
6667c02ca9 optimize sync_waiter.c when the waiter fiber and the wakeup fiber are in the same thread. 2022-12-25 16:19:05 +08:00
zhengshuxin
199bae6894 add checking before call sync_timer_await 2022-12-25 16:18:41 +08:00
zhengshuxin
078601357a fixed one bug that the function pointer of IO api maybe not been set 2022-12-25 16:16:39 +08:00
zhengshuxin
da9959c4db Don't add reference for FILE_EVENT in poll.c 2022-12-22 16:23:39 +08:00
zhengshuxin
078e0b23fd The current running fiber should be set in poll.c 2022-12-20 16:15:46 +08:00
zhengshuxin
7a8694e367 Fixed one bug in poll.c for closing another fiber's fd 2022-12-20 15:34:47 +08:00
zhengshuxin
afaf06e041 add another more efficient sendfile's implement than by using splice. 2022-12-12 02:36:11 +08:00
zhengshuxin
fbbf99ea0d delete usless MACRO define 2022-12-12 01:00:43 +08:00
zhengshuxin
8901830536 test fiber_stop demo 2022-12-19 15:00:03 +08:00
郑树新
75526ace1a build ok on windows 2022-12-17 19:20:20 +08:00
zhengshuxin
92d5fdc284 release 3.6.0-2 for compatibility for calling gettid() on Linux. 2022-12-16 14:53:04 +08:00
zhengshuxin
ffe5b13c9e compiling ok on ubuntu 2022-12-16 13:48:37 +08:00
shuxin   zheng
4706251ffa build ok on macos 2022-12-16 13:44:49 +08:00
zhengshuxin
050276c8fe fixed one occasionally bugs in fiber_mutex that the waiter can't be wakeuped. 2022-12-16 12:42:47 +08:00
zhengshuxin
61f9c60c8a format code style 2022-12-16 10:39:18 +08:00
zhengshuxin
22c65aba40 macro define should enclosed in brackets 2022-12-16 10:38:48 +08:00
zhengshuxin
a20e6ee97a adding fiber dead lock ... 2022-12-13 17:45:21 +08:00
zhengshuxin
0440437f5c adding fiber mutex dead lock ... 2022-12-10 17:11:29 +08:00
zhengshuxin
41d6e8b53b add some comments 2022-12-09 18:33:57 +08:00
zhengshuxin
bc029e4dd8 The eventfd can't use socket IO API which can only use read/write API. 2022-12-09 18:31:41 +08:00
zhengshuxin
773ddad8c6 optimize fiber_read.c/fiber_write.c by using C macro 2022-12-09 18:27:57 +08:00
zhengshuxin
bbcb2484f8 just compiling for linux 2022-12-08 17:23:56 +08:00
shuxin   zheng
65221aab45 add new files into the vs projects in fiber module 2022-12-08 17:18:51 +08:00
shuxin   zheng
7b0b7c73bb move some internal IO functions into one file io.h 2022-12-08 17:12:13 +08:00
zhengshuxin
16db7043e4 optimize for one FILE_EVENT can be used by more fibers simultaneously. 2022-12-08 16:47:28 +08:00
zhengshuxin
dec66530a2 fixed one bug that lseek can't distinguish eventfd and file fd, so we use another method to do it. 2022-12-08 16:31:02 +08:00
zhengshuxin
970c19e531 test ... 2022-12-08 14:27:01 +08:00
zhengshuxin
901c42b804 optimizing fiber module ... 2022-12-07 21:38:46 +08:00
zhengshuxin
7ef9870487 delete unused file 2022-12-06 16:53:14 +08:00
zhengshuxin
0a4ecd5d94 rename file_read.c/file_write.c to fiber_read.c/fiber_writer.c 2022-12-06 15:34:27 +08:00
zhengshuxin
2b2f6dd57f move IO read/write to the file_read.c/file_write.c 2022-12-05 18:40:22 +08:00
zhengshuxin
0b559431ea add conditional compiling for statx, renameat in fiber module 2022-12-03 20:06:02 +08:00
zhengshuxin
b81c1f9db0 init res value 2022-11-30 13:48:10 +08:00
zhengshuxin
db0b4971f0 The res value be set to acl_fiber_set_error in file_close() wasn't inited yet. 2022-11-30 13:45:31 +08:00
zhengshuxin
d0f1050531 optimize and test io_uring for closing and canceling IO processes. 2022-11-30 13:06:31 +08:00
zhengshuxin
77b5c570e3 delete unused codes 2022-11-29 11:46:14 +08:00
zhengshuxin
4250115464 add more comments and add more safety codes for close fd in no-fiber mode. 2022-11-28 23:32:26 +08:00
zhengshuxin
753bff583b test 2022-11-24 20:27:01 +08:00
zhengshuxin
ca5ca77dff remove debug info 2022-11-24 20:24:06 +08:00
zhengshuxin
7330aa00bb test fiber 2022-11-24 20:05:46 +08:00
zhengshuxin
4a00da4e38 fixed bugs in io.c of fiber module when calling write api in no-coroutine mode. 2022-11-24 06:55:38 +08:00
zhengshuxin
8e8db764fd fixed one bug there's a dead-locking when fiber_cond waits timedout 2022-11-23 13:20:02 +08:00
zhengshuxin
da61f288ae optimize and test fiber_cond 2022-11-21 11:51:31 +08:00
zhengshuxin
96b6a74fbe optimize and test fiber_cond 2022-11-21 00:16:49 +08:00
zhengshuxin
24a553e66b optimize fiber_mutex, fiber_cond 2022-11-20 22:30:15 +08:00
郑树新
96dda1a925 compile on windows 2022-11-19 22:12:08 +08:00
zhengshuxin
fec4daee79 fixed bugs when open_limit return -1, we should use one default value for event_select.c and event_poll.c in fiber. 2022-11-19 21:20:41 +08:00
zhengshuxin
9cac39c265 optimize and test fiber_cond, fiber_mutex on io_uring 2022-11-19 19:15:28 +08:00
zhengshuxin
90b054a176 build ok on macos for fiber module 2022-11-18 21:51:46 +08:00
zhengshuxin
1f2f79c192 optimize fiber_mutex by using context switch when the owner and waiter are in the same thread 2022-11-18 16:47:10 +08:00
郑树新
f5d6b15f33 test iocp of fiber on windows 2022-11-17 22:00:22 +08:00
郑树新
51b7ea8ebb test fiber module on windows platform 2022-11-17 15:16:53 +08:00
郑树新
5ef61a9f15 delete unused branch 2022-11-17 14:28:31 +08:00
shuxin   zheng
fca99933f0 build ok by xcode 2022-11-17 12:10:33 +08:00
shuxin   zheng
a4ea9e8129 optimize and test fiber_mutex, fiber_cond on macos 2022-11-17 11:24:56 +08:00
zhengshuxin
ce0a0c6468 testing ... 2022-11-16 23:18:22 +08:00
shuxin   zheng
ed6e04e63b decrease the size of ACL_FIBER 2022-11-16 18:13:08 +08:00
zhengshuxin
365a62a96d test fiber_cond 2022-11-16 15:50:24 +08:00
zhengshuxin
eb9739942e optimize and test fiber_mutex, fiber_cond 2022-11-16 15:41:33 +08:00
zhengshuxin
222f62e83a format code 2022-11-13 13:56:26 -05:00
zhengshuxin
8d09efed12 optimize fiber_cond 2022-11-13 13:56:05 -05:00
zhengshuxin
27f8fa6fb6 optimize and test fiber_cond 2022-11-13 13:52:41 -05:00
zhengshuxin
19f19ad7c0 optimize fiber_cond 2022-11-13 12:38:46 -05:00
zhengshuxin
652008e29a optimize and test fiber_mutex, fiber_cond 2022-11-13 12:00:09 -05:00
zhengshuxin
14f0900b73 optimize ... 2022-11-14 05:43:55 -05:00
zhengshuxin
eadd92e9e3 optimize mdule of fiber 2022-11-14 04:55:09 -05:00
zhengshuxin
84ab52a4a5 optimize and test fiber_cond 2022-11-14 04:39:28 -05:00
zhengshuxin
0ad17e5048 test fiber_cond ... 2022-11-14 02:56:57 -05:00
zhengshuxin
f84cfa370d change the cpp of fiber according the c's changing. 2022-11-13 10:37:41 -05:00
zhengshuxin
948716dd57 optimize fiber_cond and fiber_mutex 2022-11-13 10:11:36 -05:00
zhengshuxin
65a84a6ede adding new fiber_cond ... 2022-11-13 03:31:02 -05:00
zhengshuxin
8863f9ef93 optimize fiber_mutex 2022-11-13 00:06:48 -05:00
zhengshuxin
1d83f7c6cf optimize fiber_mutex 2022-11-12 21:54:50 -05:00
zhengshuxin
bbafef19ad optimize and test fiber_mutex.c 2022-11-12 21:15:51 -05:00
zhengshuxin
821d06d573 test fiber_mutex 2022-11-11 09:53:23 -05:00
zhengshuxin
d4981e0a9a test ... 2022-11-10 10:12:10 -05:00
zhengshuxin
3d8a6a7879 optimize and test fiber_mutex ... 2022-11-09 09:09:00 -05:00
zhengshuxin
fb91f6ffd2 add lost files 2022-11-08 08:56:22 +08:00
zhengshuxin
4d81f0fe5f adding fiber_mutex ... 2022-11-07 18:28:28 +08:00
zhengshuxin
7344b417a4 adding fiber mutex ... 2022-11-06 09:21:53 -05:00
zhengshuxin
883f4d0e2d there is some error in fiber_event.c to be fixed in io_uring mode, the fiber_event.c maybe to rewrite ... 2022-11-03 06:45:53 -04:00
zhengshuxin
fa5d46f3b3 test 2022-11-02 10:28:00 -04:00
zhengshuxin
49b617f2e3 use different context for read/write operations in io_uring module 2022-11-02 06:57:18 -04:00
zhengshuxin
b78e958dea test splice, pread, pwrite in multiple coroutines in multiple threads 2022-10-31 04:54:43 -04:00
郑树新
733e83c5b6 test fiber with iocp engine 2022-10-30 23:27:48 +08:00
郑树新
e1d749eef6 compile on windows 2022-10-30 19:56:24 +08:00
zhengshuxin
bd04860c0e optimize io_uring engine in lib_fiber 2022-10-30 05:48:23 -04:00
zhengshuxin
9b977d213d optimize io_uring ... 2022-10-29 11:38:33 -04:00
zhengshuxin
9b4b38d59f optimize and test io_uring 2022-10-28 11:58:28 -04:00
zhengshuxin
913629b5e9 optimize code style 2022-10-28 06:23:52 -04:00
zhengshuxin
a87aadb291 add io_uring in master service template. 2022-10-26 11:21:28 -04:00
zhengshuxin
9286a008c5 test 2022-10-26 07:03:34 -04:00
zhengshuxin
3f36b8da2f optimize and test fiber module 2022-10-24 03:33:06 -04:00
郑树新
106283c9f4 build ok for windows 2022-10-23 18:08:20 +08:00
zhengshuxin
003338f197 add compiling conditions 2022-10-23 17:38:53 +08:00
zhengshuxin
5baf77edf5 add conditional compiling for using io_uring 2022-10-23 17:22:14 +08:00
zhengshuxin
9913bcdb81 build on mac 2022-10-23 10:15:04 +08:00
zhengshuxin
a8241bfdcc optimize and test pread/pwriter in io_uring engine 2022-10-20 05:32:22 -04:00
zhengshuxin
d8db1f5de9 test and optimize ... 2022-10-21 06:30:55 -04:00
zhengshuxin
acac293ee1 test sendfile ... 2022-10-20 01:25:54 -04:00
zhengshuxin
7e30d96f45 test sendfile of io_uring ... 2022-10-20 07:14:04 -04:00
zhengshuxin
9ceca47c9f optimize and test io_uring... 2022-10-19 06:45:10 -04:00
zhengshuxin
7f635e1cd6 test and optimize io_uring 2022-10-10 07:42:19 -04:00
zhengshuxin
f960c8f689 test io_uring 2022-10-18 06:47:08 -04:00
zhengshuxin
ecc4a945bd test and optimize io_uring ... 2022-10-17 06:33:14 -04:00
zhengshuxin
f67cac51a6 optimize and test io_uring 2022-10-17 01:55:43 -04:00
zhengshuxin
a1f492844a test 2022-10-10 02:32:21 -04:00
zhengshuxin
b9f1d3f677 optimize and test io_uring module in fiber 2022-10-10 02:25:10 -04:00
zhengshuxin
b3c2ddaac8 adding pread, pwrite, sendfile in io_uring module of fiber 2022-10-09 12:09:09 -04:00
zhengshuxin
ce0c45f8d5 add supporting file operations in io_uring event of fiber mode 2022-10-13 00:48:42 -04:00
zhengshuxin
a78f08a6a9 io_uring in fiber supports file's open, read, and write. 2022-10-12 15:44:37 -04:00
zhengshuxin
4a2f036f7a optimize and test io_uring module in fiber 2022-10-12 05:55:50 -04:00
zhengshuxin
61c6053c29 build ok on macos 2022-10-11 22:37:09 +08:00
zhengshuxin
1ed47abeb1 optimize and test io_uring... 2022-10-08 15:15:21 -04:00
zhengshuxin
dd3fcc3919 add and test io_uring... 2022-10-09 11:30:07 -04:00
zhengshuxin
42bc75c237 test io_uring ... 2022-10-09 01:46:14 -04:00
zhengshuxin
615bb8d2c0 test and optimize io_uring 2022-10-08 14:07:32 -04:00
zhengshuxin
82d56ea351 add and test io_uring 2022-10-08 13:34:12 -04:00
zhengshuxin
ac915cf321 adding io_uring ... 2022-10-08 16:45:20 -04:00
zhengshuxin
14e9a8a159 adding io_uring ... 2022-10-08 10:25:40 -04:00
zhengshuxin
64dab7b0f9 adding io_uring ... 2022-10-08 07:23:56 -04:00
郑树新
f52536bd5a build dynamic DLL ok on windows 2022-09-14 16:24:54 +08:00
郑树新
58dceb57d5 optimize vs projects 2022-09-05 20:44:55 +08:00
zhengshuxin
864179f7fe test hooked IO api in fiber module 2022-09-05 10:33:40 +08:00
zhengshuxin
c9f82e8b85 format macro 2022-09-05 09:40:19 +08:00
zhengshuxin
5e3f7358ba optimize fiber_file_close() of fiber_io.c 2022-09-02 23:25:28 +08:00
zhengshuxin
fbd053268f restore socket IO process templely 2022-09-01 11:26:01 +08:00
zhengshuxin
ae39d3ec94 optimize network IO module. 2022-08-29 17:09:02 +08:00
郑树新
026485c21e compile acl on windows ok 2022-08-22 22:32:23 +08:00
zhengshuxin
1944187834 It't not reasonable in acl_fiber_poll() that the max timeout will used when the timeout is -1. 2022-08-15 15:11:41 +08:00
zhengshuxin
e664f21494 build acl ok on Cygwin 2022-08-06 20:03:51 +08:00
zhengshuxin
785487b466 add wait_group for fiber module like sync.WaitGroup in Golang 2022-08-01 15:48:21 +08:00
郑树新
2830be54fa Acl can be built by cmake tools chanins 2022-07-10 20:13:15 +08:00
zhengshuxin
63c994a1d4 test fiber event in multiple threads mode 2022-07-03 23:49:44 +08:00
zhengshuxin
6309cc694f build ok acl by xmake 2022-06-14 15:35:33 +08:00
shuxin   zheng
e4e3615f34 build for arm32 2022-06-02 23:06:53 +08:00
shuxin   zheng
835eaf3c4e build for arm32 2022-06-02 23:04:15 +08:00
shuxin   zheng
de6a5afb3a Don't expose acl_fiber_hook_api() 2022-05-29 13:04:02 +08:00
shuxin   zheng
ce0655e938 modify comments for ring structure 2022-05-11 18:42:08 +08:00
zhengshuxin
f90faf5542 fixed one bug in acl_fiber_yield() API in fiber.c where the returning value is invalid. 2022-05-11 17:39:28 +08:00
郑树新
95dbc454d6
Merge pull request #275 from sidyhe/bugfix2
fiber: bugfix recv when signal
2022-05-07 13:24:02 +08:00
郑树新
a1898f5cc6
Merge pull request #276 from sidyhe/bugfix3
fiber: /etc/hosts only for unix
2022-05-07 00:09:54 +08:00
Sid
3c3be91cf9
parse hosts for win32 2022-05-06 17:42:45 +08:00
Sid
086ea99044
fiber: /etc/hosts only for unix 2022-05-06 03:12:23 +08:00
sid
b1193d39c7 fiber: bugfix recv when signal 2022-05-06 02:44:24 +08:00
Sid
4801b5c8ee
fiber: bugfix unexpect exit
无IO协程时调度器异常退出 (win/linux)

复现步骤: 创建一个协程, 进行几个IO操作, 然后死循环 acl_fiber_delay(1000)
2022-05-06 02:33:51 +08:00
郑树新
854c1aa4ca merge and format event_iocp.c; add dns-gate demo project 2022-05-01 23:29:31 +08:00
郑树新
295913207d
Merge pull request #272 from sidyhe/bugfix
fiber: bugfix for win32 (add_read and iocp_wait)
2022-05-01 23:15:52 +08:00