306 Commits

Author SHA1 Message Date
mutouyun
26c5078d1b upd: add [TBD] comment 2022-10-30 17:09:55 +08:00
mutouyun
d55d9f549f add: [ipc] shared_memory object 2022-10-30 16:09:02 +08:00
mutouyun
d003e94076 add: [imp] sys::error object 2022-10-30 15:21:45 +08:00
mutouyun
7d39e5395a upd: [ipc] yield 2022-10-30 12:26:43 +08:00
mutouyun
2dd85adc52 add: [imp] comments 2022-10-29 19:46:39 +08:00
mutouyun
0e66c9a9bd fix: [imp] error C3259: 'constexpr' functions can only have one return statement 2022-10-29 19:32:51 +08:00
mutouyun
a0076f6bfb add: [imp] span ut 2022-10-29 19:19:11 +08:00
mutouyun
a0271041ee upd: [imp] span improved 2022-10-29 15:47:12 +08:00
mutouyun
595c1e4112 fix: [imp] VS2015 error C2610 2022-10-16 21:40:54 +08:00
mutouyun
3a3168b6f4 upd: [imp] span (TBD) 2022-10-16 20:23:04 +08:00
mutouyun
081e20bfd6 add: [imp] span (TBD) 2022-10-16 20:10:41 +08:00
mutouyun
4e4f22e3a8 upd: [ipc] spin lock 2022-10-15 18:39:36 +08:00
mutouyun
9e625b603b add: [ipc] implementation of memory mapping (TBD) 2022-09-04 21:57:05 +08:00
mutouyun
e4add79508 upd: [imp] optimize imp namespace macro 2022-08-19 12:10:10 +08:00
mutouyun
db2b2b38ec add: [system] sys::conf page_size for win 2022-08-14 22:01:49 +08:00
mutouyun
c604fadbea add: [system] (TBD) sys::conf page_size 2022-08-14 21:55:44 +08:00
mutouyun
64a3ba24e7 upd: [system] adjust the output format of the error message 2022-08-14 13:45:21 +08:00
mutouyun
c51395c033 upd: [log] completion annotation 2022-08-14 12:52:21 +08:00
mutouyun
12f415fd19 fix: [log] generic constructor may shadow the default copy constructor 2022-08-14 00:34:50 +08:00
mutouyun
01c28816a2 add: [system] add features 2022-08-13 18:02:25 +08:00
mutouyun
8231d6f89e add: [codecvt] support for char8_t, char16_t, and char32_t 2022-08-13 17:52:00 +08:00
mutouyun
9f333c8b0f fix: [log] error C2440: 'initializing': cannot convert from '...' to '... noexcept' 2022-08-07 22:45:14 +08:00
mutouyun
ce52a1176c add: [codecvt] character set encoding conversion interface 2022-08-07 22:29:11 +08:00
mutouyun
56ee0e12df add: [log] exception handling for log printing 2022-08-07 17:51:30 +08:00
mutouyun
3522061321 upd: [def] adjusting predefined macros 2022-08-07 17:49:52 +08:00
mutouyun
6617033a63 add: [detect-plat] add the Apple platform detection macro 2022-08-07 15:20:26 +08:00
mutouyun
df3890d0c5 fix: [log] adjust code interface and fix bugs 2022-05-29 17:58:37 +08:00
mutouyun
e1de7f9638 add: [log] a simple implementation to be optimized 2022-05-23 00:19:07 +08:00
mutouyun
0b504f7b48 fix: expected ( before ; token 2022-05-22 20:34:56 +08:00
mutouyun
82072214d8 fix: fatal error span 2022-05-22 18:31:33 +08:00
mutouyun
fcca475076 add: [log] implement simple log function (TBD) 2022-05-22 18:29:18 +08:00
mutouyun
c1557a72ac fix: [vs2015] error C3250: 'u': declaration is not allowed in 'constexpr' function body 2022-05-15 19:58:53 +08:00
mutouyun
d129e6221a fix: ‘detail_result’ does not name a type 2022-05-15 19:40:58 +08:00
mutouyun
29188f939c add: [mmap] add interface declarations 2022-05-15 19:35:58 +08:00
mutouyun
e21da4fe2d add: [result] an additional status code can be returned on failure to return a pointer 2022-05-15 19:20:30 +08:00
mutouyun
9e170999a1 add: additional notes 2022-05-15 18:24:51 +08:00
mutouyun
c704aef5f1 modify: adjust result so that it adjusts the output based on the type 2022-05-15 18:15:39 +08:00
mutouyun
7d6eac4e6b add: libimp for utilities 2022-04-23 18:30:43 +08:00
mutouyun
2fb49eb3c4 add ut 2022-04-17 12:23:01 +08:00
mutouyun
e5f722937e add 'result' 2022-04-17 11:42:04 +08:00
mutouyun
85931e7d20 add shm.h 2022-04-03 17:10:48 +08:00
mutouyun
67bdae6fd7 修正一些bug 2022-02-27 23:50:28 +08:00
mutouyun
c32615dbda 调整代码格式和注释 2022-02-27 21:22:43 +08:00
mutouyun
23b7780485 添加部分有用的小组件 2022-02-27 18:03:30 +08:00
mutouyun
f18c27ec29 开始重构 2022-02-27 17:13:28 +08:00
mutouyun
20168fb869 尝试去除恶心的连接检测(TBD) 2022-02-27 13:47:25 +08:00
mutouyun
a2e5cc7804 修正和改进posix errno打印 2022-02-04 17:48:24 +08:00
mutouyun
d946ad0948 modify interface of sync.condition 2021-10-23 17:27:08 +08:00
mutouyun
f6bd578c8a reduce the number of recheck times for the sleep function 2021-09-20 23:29:30 +08:00
mutouyun
ed8b1fd608 fix some bugs for linux-mutex 2021-09-20 20:31:08 +08:00
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