misonyo
e02d6e616b
[driver/ringbuffer]illegal access to freed memory
2019-01-21 21:59:39 +08:00
armink
74232f2de4
[DeviceDriver][rbb] Add some comments and rt_rbb_blk_size/rt_rbb_blk_buf API.
...
Signed-off-by: armink <armink.ztl@gmail.com>
2018-11-22 18:08:12 +08:00
Bernard Xiong
2c0640a178
[license] Change license to Apache.
2018-10-14 19:37:18 +08:00
armink
dff8a2c513
[DeviceDriver] Add rbb (ring block buffer) data structure.
2018-09-12 08:59:58 +08:00
neverxie
3a83e5524f
[components][pipe] Fix 'pipe' command close bug when open failed.
2018-08-11 18:45:18 +08:00
Bernard Xiong
0cac9afc4b
[Kernel] clean code for indentation.
2018-06-26 12:02:03 +08:00
Bernard Xiong
ef132f3c94
[Kernel] clean code for indentation.
2018-06-26 11:57:20 +08:00
Bernard Xiong
a1a56ce1d1
[Kernel] Add flag in wait queue and fix wakeup issue.
2018-06-26 11:19:38 +08:00
armink
570ae751be
[components][drivers] Add irq lock to rt_wqueue_wait.
2018-06-12 17:10:20 +08:00
Bernard Xiong
884fb70fe9
[Kernel] Add device ops feature.
2018-06-10 17:59:17 +08:00
liang yongxiang
cc81b47be2
[components] fixed signed/unsigned mismatch warning
2018-04-09 12:05:51 +08:00
tangyuxin
5b31545970
[drivers]Fix put_force bug
2018-03-25 07:54:31 +08:00
Bernard Xiong
00c6e81ecc
[DeviceDrivers] fix type unknown issue in pipe
2017-12-31 23:52:27 +08:00
BernardXiong
8246da645d
[DeviceDrivers] fix the compiling warning.
2017-12-31 14:45:43 +08:00
bernard
09f2d42e5a
[DeviceDrivers] Add device API in pipe device.
2017-12-29 22:33:39 +08:00
JasonJiaJie
ef219c20c2
[Driver][Pipe]Memory leak issue when close a pipe.
...
There is a memory leak issue when close a pipe.
2017-11-09 16:49:46 +08:00
bernard
a8a7d60877
[DeviceDrivers] Remove compiling warning in workqueue.
2017-10-18 09:29:30 +08:00
bernard
8a38307e2c
[libc] Add RT_USING_POSIX macro.
...
1. Add macro check in rtdebug.h;
2. Use RT_USING_POSIX for poll/select, stdin etc.
3. Split dfs_posix.h to dfs_posix.h, dfs_poll.h and dfs_select.h;
2017-10-17 22:27:06 +08:00
bernard
19aa36e830
[DeviceDrivers] Add sync mode in work queue.
2017-10-17 17:53:01 +08:00
ArdaFu
fc7abc6580
[components][drivers] Check macro "RT_USING_DFS" when using DFS relative method/functions.
2017-10-16 15:12:35 +08:00
bernard
d7087fdd3b
[DeviceDrivers] change cmd type.
...
1. Change 'rt_uint8_t' type of cmd to 'int';
2. Add waitqueue;
3. Split device ipc header files;
2017-10-15 22:56:46 +08:00
Bernard Xiong
c442db81fc
[DeviceDrivers] Fix the re-work issue in workqueue.
2017-02-27 00:58:11 +08:00
bernard
b4757b950f
[DeviceDrivers] Add critical_work for wqueue.
2017-01-31 13:17:04 +08:00
armink
c414bdaac8
[DeviceDrivers]Modify the dataqueue comments.
2016-11-02 08:17:24 +08:00
armink
6fe47a9537
[DeviceDrivers]Improve dataqueue resume suspended thread code. Thanks for @grissiom suggestion.
2016-10-31 15:08:55 +08:00
armink
0970cf03a4
[DeviceDrivers]Reset dataqueue waiting_lwm flag when suspended_push_list is empty
2016-10-31 14:47:48 +08:00
armink
bda6543305
[DeviceDrivers]Fix dataqueue irq not resume bug.
2016-10-29 14:35:07 +08:00
armink
7860ea4f83
[DeviceDrivers]Fix dataqueue calculate put and get buffer index bug.
2016-10-19 10:54:22 +08:00
armink
f2c31eebb5
[DeviceDrivers]Fix dataqueue's bug when push data is timeout the lwm flag isn't reset.
2016-10-19 10:49:42 +08:00
Bernard Xiong
77b5098ae2
[DeviceDriver] Add more exported symbols for completion.
2015-05-11 12:33:15 +08:00
ItsEddy
16bf2e7255
[DeviceDriver] Fix inverted logic on SConscript
...
Remove dataqueue/pipe if not enable RT_USING_HEAP, supply the missing `not`.
2015-04-04 02:17:26 +08:00
Bernard Xiong
40db28cfec
[DeviceDriver] Remove dataqueue/pipe if not enable RT_USING_HEAP
2015-03-31 06:17:49 +00:00
KodakWang
29fd52dfb8
Update completion.c
...
fix: completion wait after, maybe can't clean the flag.
2015-03-24 15:54:08 +08:00
Bright Pan
2d67fe6565
[Driver/ringbuffer]: Fix put_force bug
...
OXape reports: http://www.rt-thread.org/phpBB3/topic3939.html
driver/ringbuffer: when data length is bigger than space length
for rb, the read_index in rb is not update.
When length > space, update the read_index, the bug can be fix, and
works fine.
2015-01-23 13:27:52 +08:00
Bernard Xiong
0ad17f462d
[DeviceDrivers] Add modification under Linux
2014-08-04 16:40:40 +08:00
bernard
005014e7d0
[Drivers] Add workqueue implementation.
2014-07-13 07:27:57 +08:00
Grissiom
0feefc03b6
device/pipe: add a control cmd to get the space left in pipe
2013-10-23 01:43:18 +08:00
Grissiom
246bdde8de
dev/portal: fix bug in portal callback forwarding
...
When forwarding rx/tx callback from the underlaying device(pipe), the
"dev" argument should be the portal. So the portal callback could think
itself as called.
2013-08-22 16:43:06 +08:00
Grissiom
824261d3bc
dev/portal: add checks on oflag
...
It does not make sense to open portal without a flag. One should open a
portal with RT_DEVICE_OFLAG_RDWR in most cases.
2013-08-22 15:12:00 +08:00
Grissiom
6e676e7754
dev/portal: implement portal device
...
Portal is a device that connect devices. Currently, you can only connect
pipes in portal. Pipes are unidirectional. But with portal, you can
construct a bidirectional device with two pipes.
2013-08-20 12:54:43 +08:00
Grissiom
7e68096a88
dev/pipe: make pipe a type of device
...
Pipe have many differences with char device. The main difference is
altough pipe have both read and write, it is unidirectional in nature.
2013-08-20 10:16:55 +08:00
Grissiom
0340300f89
dev/pipe: cleanup
2013-08-19 16:25:17 +08:00
Grissiom
e8cca2315a
dev/pipe: call rx_indicate the time we resume reader
...
Some reader(FinSh again) would like to block on a semaphore which is
released in rx_indicate. So we should invoke rx_indicate in
_rt_pipe_resume_reader.
2013-08-19 15:57:59 +08:00
Grissiom
d683d32bd5
device/pipe: add nonblocking read/write and force write mode
...
The previous implementation will always blocks the reader/writer.
However, at least FinSh would expect the device to be nonblocking ---
read should return 0 when there is no data in it.
2013-08-19 15:35:56 +08:00
Grissiom
4919d29d69
ringbuffer: add put_force and putchar_force API
...
Add the APIs that will discard the old data when rb is full.
2013-08-19 15:32:42 +08:00
Grissiom
981d929b56
ringbuffer: fix the ambiguous name
...
RT_RINGBUFFER_SIZE could mean "the size of the whole buffer", "the size
of the empty space" or "the size of the data". Moreover, it's never a
micro anymore. Change it to rt_ringbuffer_data_len before it's too late.
Also, RT_RINGBUFFER_EMPTY is changed to rt_ringbuffer_space_len.
2013-08-19 14:12:35 +08:00
Grissiom
38ce3879d8
device/pipe: add rt_pipe_{init,detach}
...
This provide the possibility that allocate the buffer of the ringbuffer
on a specific region, instead of always mallocing it. It also bring us
the benefit of using pipe device on the systems without heap.
2013-08-19 12:28:59 +08:00
yiyue.fang
621fbdb90c
Embedded GPLv2 license in drivers
2013-06-28 00:36:54 +08:00
Grissiom
952bc0d4ef
ringbuffer: format the code to a more symmetric structure
2013-05-08 15:54:30 +08:00
Grissiom
639bd30321
reimplement ringbuffer
...
The new implementation use the mirroring method to distinguish full
buffer and the empty buffer. It also support buffers of arbitrary size.
2013-05-08 15:45:31 +08:00