mutouyun
|
04fda1cc3d
|
use sync to refactor waiter
|
2021-09-20 15:59:44 +08:00 |
|
mutouyun
|
0cccdac868
|
merge issue-61; add condition for linux
|
2021-09-19 17:21:39 +08:00 |
|
mutouyun
|
d37a6740ea
|
add ut for sync::semaphore
|
2021-09-12 21:48:22 +08:00 |
|
mutouyun
|
d0e2a4d80c
|
add semaphore for win
|
2021-09-12 15:59:44 +08:00 |
|
木头云
|
78be14be37
|
Merge branch 'develop' into master
|
2021-08-29 11:05:24 +08:00 |
|
木头云
|
d80bea9b5d
|
fix: unexpected crash
An unexpected crash caused by an unconnected exit.
|
2021-08-23 13:10:03 +08:00 |
|
mutouyun
|
98a3449865
|
fix some bugs, adjust the test cases
|
2021-07-11 13:13:30 +08:00 |
|
mutouyun
|
69e1586b5a
|
remove tls
|
2021-07-10 14:22:31 +08:00 |
|
mutouyun
|
cca4664e84
|
option(LIBIPC_BUILD_SHARED_LIBS 'Build shared libraries (DLLs).' OFF)
|
2021-07-10 13:50:46 +08:00 |
|
mutouyun
|
455c0b479d
|
add sync::mutex for windows/linux
|
2021-06-20 23:50:39 +08:00 |
|
木头云
|
681f8e6736
|
add large_msg_align for cache memory alignment
|
2021-05-07 15:48:31 +08:00 |
|
mutouyun
|
6163618433
|
针对不同类型的策略,增加不同的sender/receiver个数检查。
- is_multi_producer:sender无限制;否则仅允许一个
- is_multi_consumer:receiver个数上限依赖is_broadcast指定;否则仅允许一个
- is_broadcast:receiver个数上限为32(uint_t<32>位数);否则无限制(uint_t<32>大小)
行为变更:
1. 在连接时根据模式检查sender/receiver是否超出上限,超出则返回false
2. 在send时确认是否允许发送(对receiver模式来说,send之前不会尝试确认sender个数)
3. 修正若干bug
|
2021-01-03 12:52:03 +08:00 |
|
mutouyun
|
af6ac84110
|
add comments
|
2021-01-01 12:39:32 +08:00 |
|
mutouyun
|
2255ae685a
|
调整接口;添加 msg_que demo
|
2020-09-20 14:55:47 +08:00 |
|
mutouyun
|
85c9eecdfd
|
避免编译时的命名冲突
|
2020-09-20 12:37:47 +08:00 |
|
mutouyun
|
7545e17084
|
简化接口
|
2020-09-20 12:20:55 +08:00 |
|
mutouyun
|
bce3894707
|
添加正常退出的机制(win)
|
2020-09-19 17:37:33 +08:00 |
|
mutouyun
|
523d38d247
|
调整目录结构,隔离include路径,修正tls在win下的问题
|
2020-09-13 17:29:14 +08:00 |
|
mutouyun
|
326bc10b2d
|
优化ut,修正tls中的bug
|
2020-09-13 15:06:47 +08:00 |
|
木头云
|
e87d516b1d
|
Update tls_pointer.h
|
2020-03-20 12:20:28 +08:00 |
|
mutouyun
|
b9cc885568
|
adjust constant definition
|
2020-03-04 13:24:43 +08:00 |
|
mutouyun
|
17c0bc76c3
|
buffer::data<T>()->T* => buffer::get<T>()->T
|
2020-03-04 12:37:48 +08:00 |
|
zhangyi
|
dbe6d6d3c6
|
fix bugs of large message buffer cache & recycle
|
2019-10-24 12:23:52 +08:00 |
|
zhangyi
|
d4bf94c2a3
|
use big message cache
|
2019-10-23 16:23:07 +08:00 |
|
zhangyi
|
8da0b32d0b
|
optimize memory management and recycle strategy
|
2019-10-21 13:32:07 +08:00 |
|
mutouyun
|
56484c0c8f
|
optimize the memory allocator
|
2019-10-05 03:48:24 +00:00 |
|
mutouyun
|
659989fd31
|
fix tls's defect
|
2019-09-21 14:21:57 +00:00 |
|
zhangyi
|
6b7c561496
|
fix tls bugs (win); modify data structure
|
2019-07-04 16:37:00 +08:00 |
|
mutouyun
|
fbf3c622e8
|
fine-tune
|
2019-07-02 23:07:39 +08:00 |
|
zhangyi
|
cf0028bf09
|
don't use std::function
|
2019-06-18 23:42:34 +08:00 |
|
zhangyi
|
a2d918dec2
|
try using ipc::string
|
2019-06-18 19:29:58 +08:00 |
|
zhangyi
|
30fa347f56
|
use shm::id_t instead of shm::handle in conn_info_head
|
2019-06-18 11:53:43 +08:00 |
|
zhangyi
|
ce3e9869fb
|
use one shm-block for big message (>= 4096)
|
2019-05-06 16:19:19 +08:00 |
|
mutouyun
|
ad9818a89b
|
move concept & pimpl helpers to single header respectively
|
2019-04-04 23:25:51 +08:00 |
|
mutouyun
|
2079c8eafb
|
rename parameter
|
2019-04-04 23:15:53 +08:00 |
|
mutouyun
|
5784b29521
|
update tls
|
2019-04-01 23:00:00 +08:00 |
|
zhangyi
|
ca6815c601
|
adjust interface for connect
|
2019-04-01 18:07:15 +08:00 |
|
zhangyi
|
755bea8112
|
add attach/detach for shm
|
2019-03-28 16:23:31 +08:00 |
|
zhangyi
|
2e2cf82d91
|
add dismiss for shm
|
2019-03-28 13:04:29 +08:00 |
|
mutouyun
|
557a849bdf
|
update shm interfaces
|
2019-03-28 12:08:02 +08:00 |
|
mutouyun
|
10e6cca8b0
|
support for specified shm modes
|
2019-03-27 22:55:36 +08:00 |
|
zhangyi
|
a35b43163c
|
support removing waiter-objects forcibly
|
2019-03-27 16:58:46 +08:00 |
|
mutouyun
|
6cc2913f6b
|
crash may cause deadlock
|
2019-03-26 22:24:25 +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 |
|
mutouyun
|
d223e3abb8
|
fix bugs; modify shm interfaces
|
2019-03-25 16:25:14 +08:00 |
|
mutouyun
|
280cc81fa2
|
remove useless codes
|
2019-03-22 22:16:53 +08:00 |
|
mutouyun
|
b65be99045
|
update
|
2019-03-20 23:42:18 +08:00 |
|
mutouyun
|
478cb62c35
|
impl ipc objects (mutex, condition, semaphore)
|
2019-02-14 15:56:01 +08:00 |
|
mutouyun
|
52302cc007
|
add wait-if for waiter
|
2019-02-12 13:22:49 +08:00 |
|
mutouyun
|
e86d3e10e1
|
modify producer-consumer policy flag
|
2019-01-26 11:20:04 +08:00 |
|
mutouyun
|
c3f66d47bb
|
prepare multi routes implementation
|
2019-01-25 18:28:39 +08:00 |
|
mutouyun
|
efe7353e55
|
adjust default data_length
|
2019-01-25 16:35:41 +08:00 |
|
mutouyun
|
99926581d1
|
add error log (TBD); use pthread api for waiter
|
2019-01-25 11:59:53 +08:00 |
|
mutouyun
|
3713d46f3e
|
remove clear_recv
|
2019-01-24 21:51:22 +08:00 |
|
mutouyun
|
5c9a8e0311
|
remove is_fixed (TBD)
|
2019-01-24 17:55:23 +08:00 |
|
mutouyun
|
12119f0f65
|
refactor
|
2019-01-24 12:13:13 +08:00 |
|
mutouyun
|
799e5db963
|
compile error
|
2019-01-23 12:03:59 +08:00 |
|
mutouyun
|
f104bc4397
|
compile error
|
2019-01-23 11:52:56 +08:00 |
|
mutouyun
|
881b060d1f
|
refactor
|
2019-01-23 11:44:26 +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
|
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
|
e5a5b9f680
|
compatible with old compilers
|
2019-01-18 12:47:41 +08:00 |
|
mutouyun
|
7b5ab36fc1
|
prepare new policies for queue
|
2019-01-17 17:47:43 +08:00 |
|
mutouyun
|
be15b2377f
|
fine-tune code
|
2019-01-17 17:34:33 +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
|
d9e24236af
|
add waiter for long-time wait. (TBD)
|
2019-01-15 21:22:09 +08:00 |
|
mutouyun
|
8af8f99df3
|
add elem_link.h
|
2019-01-15 15:40:13 +08:00 |
|
mutouyun
|
e3f963d2b4
|
circ_elem.h => elem_circ.h; organ => orgnz; elem_head => conn_head
|
2019-01-15 15:27:06 +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
|
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
|
164402b21b
|
add prod_cons<relat::multi, relat::multi, trans::broadcast>
|
2019-01-07 19:10:56 +08:00 |
|
mutouyun
|
7813e20a5b
|
adjust ipc::sleep
|
2019-01-07 15:26:51 +08:00 |
|
mutouyun
|
0dfbfd3fbf
|
adjust ipc::sleep
|
2019-01-07 15:25:03 +08:00 |
|
mutouyun
|
45e4429056
|
adjust param
|
2019-01-06 23:37:58 +08:00 |
|
mutouyun
|
27eb5ee99b
|
use ipc::yield
|
2019-01-06 23:20:19 +08:00 |
|
mutouyun
|
224ea72547
|
use elem_array<ipc::circ::prod_cons>
|
2019-01-06 22:30:55 +08:00 |
|
mutouyun
|
8e104ded0f
|
add prod_cons<relat::multi, relat::multi, trans::unicast>
|
2019-01-05 16:09:56 +08:00 |
|
mutouyun
|
ea52920b7d
|
msleep(1)
|
2019-01-05 14:35:25 +08:00 |
|
mutouyun
|
90c60ddd58
|
std::atomic<T> may not have value_type
|
2019-01-04 22:26:40 +08:00 |
|
mutouyun
|
98c367a380
|
fix compiling error
|
2019-01-04 22:16:48 +08:00 |
|
mutouyun
|
f388a0a360
|
fix compiling error; preparing to refactor
|
2019-01-04 22:11:19 +08:00 |
|
mutouyun
|
17621c1e83
|
preparing to refactor
|
2019-01-04 18:48:21 +08:00 |
|
mutouyun
|
d67a2076ed
|
remove channel::send_for
|
2019-01-02 16:37:41 +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
|
2941007301
|
use pool_alloc instead of std::allocator
|
2018-12-29 22:42:26 +08:00 |
|
mutouyun
|
02a5920697
|
try pool_alloc (TBD)
|
2018-12-29 00:51:31 +08:00 |
|
mutouyun
|
0ea8e27446
|
still has some bugs
|
2018-12-26 18:22:34 +08:00 |
|
mutouyun
|
6a2c7671db
|
adjust memory order
|
2018-12-24 14:22:02 +08:00 |
|
mutouyun
|
a4079ab7af
|
compiling error
|
2018-12-24 13:34:42 +08:00 |
|
mutouyun
|
492d095332
|
noexcept; adjust memory order
|
2018-12-24 13:29:20 +08:00 |
|
mutouyun
|
f962dc4cb5
|
adjust comment
|
2018-12-20 17:19:08 +08:00 |
|
mutouyun
|
b5ae2746a2
|
not throw but waiting when size == 0
|
2018-12-20 17:14:27 +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 |
|
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
|
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
|
8bc8feb68f
|
add IPC_EXPORT for tls
|
2018-12-16 11:53:56 +08:00 |
|
mutouyun
|
d6afba1d7a
|
add channel ut
|
2018-12-15 22:51:40 +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
|
69cfad56c3
|
mv ipc::yield from def.h to rw_lock.h
|
2018-12-14 11:29:17 +08:00 |
|
mutouyun
|
7b812c3c6e
|
optimize lock_shared
|
2018-12-14 11:21:46 +08:00 |
|
mutouyun
|
c47175360c
|
fix bug, remove rw_cas_lock
|
2018-12-14 00:00:45 +08:00 |
|
mutouyun
|
96c2a037f3
|
considering a different implementation, may have bugs
|
2018-12-13 18:37:06 +08:00 |
|
mutouyun
|
a26f171124
|
max defined in <windows.h>
|
2018-12-13 15:40:19 +08:00 |
|
mutouyun
|
7a7426a8b8
|
poor performance on arm-a7
|
2018-12-13 11:50:26 +08:00 |
|
mutouyun
|
b6248ad5dc
|
use ipc::yield instead of this_thread::yield
|
2018-12-13 11:00:21 +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
|
bc25cd6912
|
change interface name for rw_lock
|
2018-12-12 16:14:04 +08:00 |
|
mutouyun
|
eccded45c2
|
add thread_fence
|
2018-12-12 09:54:08 +08:00 |
|
mutouyun
|
35a8f95619
|
test rw_lock
|
2018-12-12 00:03:42 +08:00 |
|
mutouyun
|
449cf75da9
|
put rw_lock to a single header file
|
2018-12-11 20:56:13 +08:00 |
|
mutouyun
|
1b047bd975
|
fix compiling errors
|
2018-12-11 20:52:15 +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
|
d5b5b3e0f4
|
def ipc::uint<N>; optimize code
|
2018-12-11 16:58:51 +08:00 |
|
mutouyun
|
caabc24b71
|
adjust elem_t construction
|
2018-11-30 22:16:44 +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 |
|
zhangyi
|
c8e81e2794
|
use std::atomic<std::size_t> instead of flag for better performance in arm; cross-platform supporting; add more test cases
|
2018-11-30 15:13:44 +08:00 |
|
mutouyun
|
b3e2c80fc0
|
use spin lock for multi-producers
|
2018-11-30 11:38:50 +08:00 |
|
mutouyun
|
9540842ba7
|
add ipc.cpp for implementation of ipc interfaces (TBD); restructure code
|
2018-11-29 23:05:53 +08:00 |
|
mutouyun
|
518fc000e7
|
add ipc.h
|
2018-11-29 18:33:58 +08:00 |
|
mutouyun
|
b3ad167970
|
fix wrong word
|
2018-11-29 00:20:15 +08:00 |
|
mutouyun
|
7d91b187fe
|
fix bugs of circ_queue
|
2018-11-29 00:14:37 +08:00 |
|
zhangyi
|
c9ce4b466a
|
add circ_queue test (TBD)
|
2018-11-28 11:53:10 +08:00 |
|
mutouyun
|
2905b55fcf
|
ipc::circ::queue & test_queue
|
2018-11-27 22:16:03 +08:00 |
|
mutouyun
|
fa2c8200bf
|
prepare for circ_queue
|
2018-11-27 20:57:34 +08:00 |
|
mutouyun
|
21789676e7
|
move circ_elem_array.h to include dir
|
2018-11-27 20:50:40 +08:00 |
|
mutouyun
|
17375bb32c
|
add circ_queue
|
2018-11-20 23:04:32 +08:00 |
|
mutouyun
|
050bb02198
|
first commit for shm.
|
2018-11-20 11:27:39 +08:00 |
|