319 Commits

Author SHA1 Message Date
mutouyun
6cc2913f6b crash may cause deadlock 2019-03-26 22:24:25 +08:00
木头云
05e481290e
eliminate warning 2019-03-26 19:17:22 +08:00
zhangyi
5affd26da6 try send/recv; support sending timeout; fix bugs 2019-03-26 19:12:59 +08:00
zhangyi
785abd1845 support timeout 2019-03-26 14:08:08 +08:00
zhangyi
6730fa578d simplify 2019-03-26 11:10:22 +08:00
mutouyun
1d2f6d13ea fine-tune 2019-03-25 23:28:49 +08:00
mutouyun
c49c15f640 for vs2015 2019-03-25 23:22:30 +08:00
zhangyi
731f61a3c1 optimize structure 2019-03-25 20:14:59 +08:00
zhangyi
0c911fb0a4 shm_win 2019-03-25 16:28:34 +08:00
mutouyun
d223e3abb8 fix bugs; modify shm interfaces 2019-03-25 16:25:14 +08:00
mutouyun
f2bfd0bc6c fine-tune 2019-03-22 23:09:42 +08:00
mutouyun
280cc81fa2 remove useless codes 2019-03-22 22:16:53 +08:00
mutouyun
93030e1997 optimize & fix bugs 2019-03-22 17:49:20 +08:00
mutouyun
b65be99045 update 2019-03-20 23:42:18 +08:00
mutouyun
4049e78c32 fix bugs; optimize (TBD); update performance.xlsx 2019-03-20 18:26:41 +08:00
mutouyun
0d0b1e0a48 optimize... 2019-03-15 12:22:28 +08:00
mutouyun
46051733bb optimize 2019-03-12 11:16:33 +08:00
mutouyun
eb1f15583e close when destruct 2019-02-14 21:29:16 +08:00
mutouyun
478cb62c35 impl ipc objects (mutex, condition, semaphore) 2019-02-14 15:56:01 +08:00
mutouyun
dd80a79c3c impl condition for windows 2019-02-14 14:11:03 +08:00
mutouyun
75f5090d6a update chat 2019-02-13 18:19:28 +08:00
mutouyun
fd92e94e51 adjust naming 2019-02-13 07:09:10 +08:00
mutouyun
ed6af29264 fine-tune 2019-02-13 06:59:28 +08:00
mutouyun
f59d94ee17 Merge branch 'master' of https://github.com/mutouyun/cpp-ipc 2019-02-13 06:45:59 +08:00
mutouyun
cee63e5f81 fix bugs of windows-waiter 2019-02-13 06:45:41 +08:00
mutouyun
19d1724188 wait_if should return a value 2019-02-12 23:31:02 +08:00
mutouyun
a6d88a1208 ReleaseSemaphore mayn't wake WaitForSingleObject up soon 2019-02-12 23:28:57 +08:00
mutouyun
4262f7bd34 Merge remote-tracking branch 'remotes/origin/master' 2019-02-12 13:47:31 +08:00
mutouyun
1cf69038bb clear codes 2019-02-12 13:46:43 +08:00
mutouyun
52302cc007 add wait-if for waiter 2019-02-12 13:22:49 +08:00
mutouyun
f7f06ab052 give up multi-wait temporarily 2019-02-04 10:41:39 +08:00
mutouyun
e94318c9a6 fix bugs for waiter of linux (still has some bugs in win, multi-wait is TBD) 2019-01-31 14:57:42 +08:00
mutouyun
eef3cc01f0 [TBD] fine-tune code 2019-01-28 10:50:35 +08:00
mutouyun
60276495b5 [TBD] add test-case; fix some bugs 2019-01-28 10:38:09 +08:00
mutouyun
018bea223e try semaphore 2019-01-27 20:43:23 +08:00
mutouyun
0d948b9dfd compile error for vs2015 (TBD) 2019-01-27 15:58:10 +08:00
mutouyun
b76375633c compile error (TBD) 2019-01-27 15:43:07 +08:00
mutouyun
fc1c058d10 add multi-wait (not ready, TBD) 2019-01-27 15:32:58 +08:00
mutouyun
c667f1513f add multi-wait (not ready, TBD) 2019-01-27 15:24:30 +08:00
mutouyun
e86d3e10e1 modify producer-consumer policy flag 2019-01-26 11:20:04 +08:00
mutouyun
59197f6c68 split condition & mutex from waiter-linux 2019-01-25 22:57:47 +08:00
mutouyun
c3f66d47bb prepare multi routes implementation 2019-01-25 18:28:39 +08:00
mutouyun
7461dc88ed for vs2015 2019-01-25 16:49:02 +08:00
mutouyun
efe7353e55 adjust default data_length 2019-01-25 16:35:41 +08:00
mutouyun
66cfab4a62 use new for synchronized-wrapper 2019-01-25 15:02:53 +08:00
mutouyun
1a71313431 no automatically clear 2019-01-25 14:00:50 +08:00
mutouyun
6ec8ca9a9e test... 2019-01-25 13:17:43 +08:00
mutouyun
fac45ec38f remove locked_fixed_alloc 2019-01-25 13:08:33 +08:00
mutouyun
99926581d1 add error log (TBD); use pthread api for waiter 2019-01-25 11:59:53 +08:00
木头云
3c6ba58b41
Update queue.h 2019-01-25 07:32:57 +08:00
mutouyun
3dc97ab6a6 try semaphore 2019-01-25 01:22:56 +08:00
mutouyun
a4b93f60cf waiter_impl -> waiter_wrapper 2019-01-25 00:11:26 +08:00
mutouyun
e8dda2c1d4 remove __has_include(<pthread.h>) 2019-01-24 23:47:45 +08:00
mutouyun
512de713f1 remove Wno-unused-variable 2019-01-24 23:20:50 +08:00
mutouyun
67972a8c7c add log 2019-01-24 23:13:15 +08:00
mutouyun
b2e48fc138 printf failure-log 2019-01-24 23:05:52 +08:00
mutouyun
34ea7095d9 test... 2019-01-24 22:27:20 +08:00
mutouyun
3713d46f3e remove clear_recv 2019-01-24 21:51:22 +08:00
mutouyun
2650ff0b0b compile error 2019-01-24 17:57:33 +08:00
mutouyun
5c9a8e0311 remove is_fixed (TBD) 2019-01-24 17:55:23 +08:00
mutouyun
949d338f31 prepare for elem_chan 2019-01-24 13:14:00 +08:00
mutouyun
12119f0f65 refactor 2019-01-24 12:13:13 +08:00
mutouyun
881b060d1f refactor 2019-01-23 11:44:26 +08:00
mutouyun
290b94902a define locked_pool_alloc 2019-01-21 12:02:38 +08:00
mutouyun
4d2b47cbb7 prepare for multi-thread fixed-alloc 2019-01-20 22:22:47 +08:00
mutouyun
27d6b0c7f5 define spin_lock 2019-01-20 21:04:16 +08:00
mutouyun
a7d9a3d476 adjust tls 2019-01-20 20:31:55 +08:00
mutouyun
52f447111c page_fixed_alloc 2019-01-18 18:45:19 +08:00
mutouyun
c625a2e5ff IPC_UNUSED_ 2019-01-18 17:40:43 +08:00
mutouyun
b52eae7c90 IPC_UNUSED_ 2019-01-18 17:27:41 +08:00
mutouyun
44a9a4b98f try compatible with old compilers 2019-01-18 14:43:58 +08:00
mutouyun
99692221b7 try compatible with old compilers 2019-01-18 14:11:30 +08:00
mutouyun
e5a5b9f680 compatible with old compilers 2019-01-18 12:47:41 +08:00
mutouyun
6a3c3cde23 fine-tune code 2019-01-17 15:50:56 +08:00
mutouyun
c69b351ae9 fine-tune code 2019-01-17 10:15:48 +08:00
mutouyun
d25f070627 use waiter for wait_for_recv 2019-01-16 18:06:21 +08:00
mutouyun
e09ea90949 implement waiter_linux.h 2019-01-16 17:03:34 +08:00
mutouyun
d1822e9fc9 shm would fail with multi-thread accessing 2019-01-16 14:01:12 +08:00
mutouyun
7e44b2dd4d shm would fail with multi-thread accessing 2019-01-16 13:56:25 +08:00
mutouyun
127233ce94 qmake error 2019-01-15 23:25:45 +08:00
mutouyun
639eaa676e qmake error 2019-01-15 23:20:50 +08:00
mutouyun
b78257de86 update 2019-01-15 21:42:02 +08:00
mutouyun
8832877c6d update 2019-01-15 21:37:56 +08:00
mutouyun
d9e24236af add waiter for long-time wait. (TBD) 2019-01-15 21:22:09 +08:00
mutouyun
b62d5a3946 circ_elem_array => circ_elem 2019-01-15 15:14:46 +08:00
mutouyun
0f6d8b3cd7 queue_t::array_t => queue_t::elems_t 2019-01-15 15:08:00 +08:00
mutouyun
b87e96b43c ipc::circ::prod_cons => ipc::prod_cons_circ; ipc::circ::queue => ipc::queue 2019-01-15 14:42:52 +08:00
mutouyun
612a59ae31 ipc::circ::relat => ipc::relat; ipc::circ::trans => ipc::trans 2019-01-14 23:10:27 +08:00
mutouyun
cfd175dbdc fix bugs; simplify codes 2019-01-08 22:37:34 +08:00
mutouyun
148344b09b update files 2019-01-08 18:35:58 +08:00
mutouyun
6c1c3afbc4 update ipc.cpp 2019-01-08 18:24:40 +08:00
mutouyun
efc0500047 remove multi_recv 2019-01-08 18:19:18 +08:00
mutouyun
79f6775324 use circ::prod_cons to implement route & channel 2019-01-08 18:02:34 +08:00
mutouyun
27eb5ee99b use ipc::yield 2019-01-06 23:20:19 +08:00
mutouyun
621078abbd error: declared ‘static’ in ‘constexpr’ function 2019-01-06 22:42:06 +08:00
mutouyun
224ea72547 use elem_array<ipc::circ::prod_cons> 2019-01-06 22:30:55 +08:00
mutouyun
d67a2076ed remove channel::send_for 2019-01-02 16:37:41 +08:00
mutouyun
eae565dfc8 adjust code 2019-01-02 12:37:18 +08:00
mutouyun
2e26176234 update performence data; add implementation of pool_alloc::clear 2019-01-02 11:58:55 +08:00
mutouyun
e1c3594ca5 using ipc::buffer instead of std::vector<byte_t> 2018-12-31 22:22:54 +08:00
mutouyun
3bea8af992 eliminate potential problems 2018-12-30 21:17:25 +08:00
mutouyun
cba780e9dc make pool_alloc public 2018-12-30 20:34:00 +08:00
mutouyun
319bcdab2f add test for pool_alloc 2018-12-30 16:28:14 +08:00
mutouyun
2941007301 use pool_alloc instead of std::allocator 2018-12-29 22:42:26 +08:00
mutouyun
8c75f8ad84 pool_alloc (TBD) 2018-12-29 18:31:01 +08:00
mutouyun
812d4b3be5 optimize channel performance 2018-12-29 12:12:27 +08:00
mutouyun
02a5920697 try pool_alloc (TBD) 2018-12-29 00:51:31 +08:00
mutouyun
64fc26733e use tls::pointer instead of thread_local 2018-12-28 14:53:34 +08:00
mutouyun
4253c1341c fix some bugs; add performance data to README.md 2018-12-27 20:06:36 +08:00
mutouyun
0ea8e27446 still has some bugs 2018-12-26 18:22:34 +08:00
mutouyun
492d095332 noexcept; adjust memory order 2018-12-24 13:29:20 +08:00
mutouyun
b815a5e50f channel::send will wait for a while & return false if there is no receiver 2018-12-24 12:11:50 +08:00
mutouyun
0eb61b8745 adjust file naming; supplement test cases 2018-12-24 11:56:42 +08:00
mutouyun
e54e9898fc complete all functions of ipc::channel (TODO: ut, benchmark) 2018-12-20 16:31:38 +08:00
mutouyun
70e1ac6865 linux shm should clear itself when all handles pointed it are released 2018-12-20 11:38:40 +08:00
mutouyun
238166bdc1 compile errors 2018-12-19 16:49:30 +08:00
mutouyun
d0b4999af4 re-add ipc::channel (TBD); use hpp instead of cpp to implement channel/route, cause it could visit the internal entities which in ipc.cpp 2018-12-19 16:37:26 +08:00
mutouyun
9cbfb8624f separate def of route into a single cpp (test) 2018-12-19 12:18:53 +08:00
mutouyun
69449c0d4f fix clang-test crash 2018-12-19 11:37:31 +08:00
木头云
4c75b44547
reinterpret_cast may not be used in a constant expression. 2018-12-18 20:30:08 +08:00
mutouyun
69bc556a52 redesigning & refactoring (TBD) 2018-12-18 20:09:31 +08:00
mutouyun
09c3c557ba fix some bugs; use thread_local 2018-12-17 22:44:37 +08:00
mutouyun
cca70b018c improve test cases (has bugs) 2018-12-17 19:07:18 +08:00
mutouyun
d61aa5e5df fix bugs; modify test case; add some helper using & functions 2018-12-17 11:49:13 +08:00
mutouyun
59a9df60c4 add test case 2018-12-17 00:00:13 +08:00
mutouyun
f09378b481 fix some bugs; if __has_include(<pthread.h>), using tls_pointer_linux.cpp; add some channel::send overloads 2018-12-16 21:30:55 +08:00
mutouyun
7982eb94c9 fix some bugs 2018-12-16 10:33:00 +08:00
mutouyun
d6afba1d7a add channel ut 2018-12-15 22:51:40 +08:00
mutouyun
ee2a4e1106 adjust code 2018-12-15 21:47:58 +08:00
mutouyun
44ab812925 rename thread_local_ptr => tls::pointer 2018-12-15 19:30:22 +08:00
mutouyun
0285e2d6e1 mv thread_local_ptr.h to include 2018-12-15 11:57:02 +08:00
mutouyun
0c6a3862d0 use thread_local_ptr instead of thread_local 2018-12-14 23:57:31 +08:00
mutouyun
1e44d6f84e pimpl small object optimization 2018-12-14 18:50:20 +08:00
mutouyun
5ffc820983 use rw_lock for ipc with multi-thread 2018-12-12 23:31:22 +08:00
mutouyun
c40dddcc06 fix bugs; optimize performance 2018-12-12 18:49:10 +08:00
mutouyun
29d25e2226 add benchmark for lock-test 2018-12-12 17:48:02 +08:00
mutouyun
eb2e75d5b7 eliminate warnings 2018-12-11 21:02:24 +08:00
mutouyun
449cf75da9 put rw_lock to a single header file 2018-12-11 20:56:13 +08:00
mutouyun
0a17257388 rw_lock (TBD) 2018-12-11 18:46:04 +08:00
mutouyun
f3a73fcc4d remove std::string from export interface 2018-12-11 17:34:54 +08:00
mutouyun
a3c90d9f8b use nested class in pimpl 2018-12-11 17:08:13 +08:00
mutouyun
85bb05bb52 complete ipc send & recv; prepare ipc::channel; add ipc ut (basic test); add ut suit name; 2018-11-30 17:32:09 +08:00
mutouyun
9540842ba7 add ipc.cpp for implementation of ipc interfaces (TBD); restructure code 2018-11-29 23:05:53 +08:00
mutouyun
21789676e7 move circ_elem_array.h to include dir 2018-11-27 20:50:40 +08:00
zhangyi
c7f49fad5a cross-platform 2018-11-27 11:41:08 +08:00
mutouyun
da25b7fc81 adjust comment 2018-11-27 10:49:57 +08:00
mutouyun
eefea828f0 not support N:M (prod-cons) 2018-11-27 10:47:23 +08:00
mutouyun
db35146542 still have bugs 2018-11-26 21:36:19 +08:00
mutouyun
2d86727be1 a little adjustment 2018-11-26 18:35:49 +08:00
mutouyun
e2cdcb24c3 still have bugs 2018-11-26 18:15:07 +08:00
mutouyun
453f93a69e using yield when checks read finished failed; fix bugs 2018-11-26 16:53:41 +08:00
mutouyun
b3b0cc59f8 fix bugs 2018-11-26 15:00:17 +08:00
mutouyun
0222af2221 add test_prod_cons function template; fix some bugs for multi-producers 2018-11-26 11:56:59 +08:00
mutouyun
ff0dbc8e2e add comments 2018-11-23 21:58:49 +08:00
mutouyun
3e7c97d9b6 rename: circ_queue.h => circ_elem_array.h; support N:M (TBD) 2018-11-23 18:35:13 +08:00
mutouyun
6802d12912 preparing for N:M 2018-11-22 21:38:38 +08:00
mutouyun
2f206d677e modify get to take; fix bug 2018-11-22 21:06:15 +08:00
mutouyun
1f50cd6ac3 optimized code 2018-11-22 17:01:20 +08:00
mutouyun
6be8071802 adjust memory order 2018-11-22 16:49:27 +08:00
mutouyun
8dbc667145 adjust memory order 2018-11-22 16:36:35 +08:00
mutouyun
aef0ed035d use cas instead of load & store; modify "commit" to "put" 2018-11-22 15:51:17 +08:00
mutouyun
daae701cec fix bugs 2018-11-22 14:05:39 +08:00
mutouyun
a6ab7bcdac fix some bugs 2018-11-21 23:10:12 +08:00
mutouyun
7718a63b24 print spent time & performance 2018-11-21 21:38:29 +08:00
mutouyun
de39be3c4f fix bugs 2018-11-21 19:03:39 +08:00
mutouyun
19b40e23cb add ut for circ_queue 2018-11-21 15:09:11 +08:00
mutouyun
17375bb32c add circ_queue 2018-11-20 23:04:32 +08:00
mutouyun
5fa9db52bf eliminate warning 2018-11-20 12:22:44 +08:00
mutouyun
050bb02198 first commit for shm. 2018-11-20 11:27:39 +08:00