Commit graph

256 commits

Author SHA1 Message Date
Felix Fietkau
6a8df07590 uloop: do less state/change tracking for kevent() on mac os x, it is unreliable
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-01-04 01:15:48 +01:00
Felix Fietkau
8686989fff ustream: increment receive buffer count
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-01-03 16:32:49 +01:00
Felix Fietkau
5bbedafe09 ustream-fd: prevent callbacks during init
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-01-03 16:32:45 +01:00
Felix Fietkau
6c28da1ae2 ustream-fd: fix read error handling
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-01-03 16:32:40 +01:00
Felix Fietkau
e7825661a2 uloop: fix immediate timeout processing on mac os x
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-01-01 23:37:22 +01:00
Felix Fietkau
7157c3a4df utils: add BUILD_BUG_ON (similar to the one in the linux kernel)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-01-01 16:10:44 +01:00
Felix Fietkau
7a117988d9 ustream: add ustream_pending_data accessor function
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-01-01 16:10:39 +01:00
Felix Fietkau
59000546c0 utils: make it unnecessary to specify the last NULL argument for calloc_a
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2012-12-31 15:40:12 +01:00
Felix Fietkau
9c8ab5d64c utils: move ARRAY_SIZE from uloop to utils.h
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2012-12-31 15:24:27 +01:00
Felix Fietkau
d03a6a27c7 add utils.c, containing a calloc-like function to allocate multiple chunks with different sizes in one block and return pointers
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2012-12-31 15:24:26 +01:00
Felix Fietkau
29c066cfd6 ustream: avoid calling s->poll from a write path to avoid looping back through the notify_write cb
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2012-12-30 19:21:03 +01:00
Felix Fietkau
300a809a7a ustream: fix polling for write buffer availability after buffering writes
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2012-12-30 17:26:40 +01:00
Felix Fietkau
84822fd6d5 ustream: suppress write attempts in ustream_printf and ustream_vprintf if a write error was flagged
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2012-12-30 15:46:18 +01:00
Felix Fietkau
975ac3e5e3 ustream: add ustream_read_buf_full() helper
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2012-12-30 15:25:35 +01:00
Felix Fietkau
4d0a00c82c jshn: fix check to reset array sequence counters on cleanup 2012-12-18 13:38:27 +01:00
Jo-Philipp Wich
0505bf5f42 jshn: introduce json_is_a() convenience function to check field types without using a temporary variable 2012-12-17 13:54:45 +01:00
Felix Fietkau
079549666f jshn: fix array handling
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2012-12-16 19:58:06 +01:00
Felix Fietkau
7bca5dd29d jshn: fix some variable handling regressions
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2012-12-16 18:04:14 +01:00
Felix Fietkau
e16fa068a5 jshn: add support for namespaces
Can be used to fix variable namespace clashes in library code using jshn

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2012-12-16 17:46:08 +01:00
Felix Fietkau
9d8f2dd47b blob.h: fix endian check
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2012-12-02 17:49:12 +01:00
Felix Fietkau
407f7a0bb3 uloop: fix tv_diff() calculation
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2012-10-31 20:28:15 +01:00
Felix Fietkau
0385cbc068 uloop: another timer fix
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2012-10-31 20:09:47 +01:00
Felix Fietkau
33b9f3aa0b uloop: fix sub-second timer offsets for uloop_timeout_set 2012-10-31 20:03:45 +01:00
Felix Fietkau
a9b44ebe55 ustream: make notify_state optional as well 2012-10-30 00:00:57 +01:00
Felix Fietkau
efc9f4b702 ustream: mark notify_read cb as optional 2012-10-30 00:00:23 +01:00
Felix Fietkau
dc69ce4799 ustream: add a poll callback function defined by the ustream implementation 2012-10-29 23:39:48 +01:00
Felix Fietkau
df0968d19b ustream: fix variable initialization
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2012-10-29 23:11:08 +01:00
Felix Fietkau
15ce776772 ustream-example: fix logic inversion 2012-10-23 18:00:20 +02:00
Felix Fietkau
6e7e8a1a91 uloop: fix a segfault on deleting the first active timer from within another timer 2012-10-23 03:41:45 +02:00
Felix Fietkau
0e51f714d1 ustream: add a pointer to the ustream struct useful for chaining ustreams 2012-10-22 22:28:47 +02:00
Felix Fietkau
ba6cd4c322 ustream.h: include stdarg.h 2012-10-22 21:14:02 +02:00
Felix Fietkau
9afe120530 add -Wmissing-declarations to cflags 2012-10-22 20:03:53 +02:00
Felix Fietkau
db38b74ac6 add declarations for lua{open,close}_uloop to avoid warnings 2012-10-22 20:03:36 +02:00
Felix Fietkau
42cd90bf4b ustream: make ustream_init_buf static 2012-10-22 20:02:38 +02:00
Felix Fietkau
e4027a6327 add a cmake file for the examples and add the binaries to .gitignore 2012-10-21 23:01:30 +02:00
Felix Fietkau
d3b3280055 ustream: add example code 2012-10-21 23:01:12 +02:00
Felix Fietkau
768a69b3ce add ustream, an api for stream buffer management 2012-10-21 23:00:06 +02:00
Felix Fietkau
ae3bcf84e1 blobmsg-example: fix compile errors 2012-10-21 03:40:53 +02:00
Felix Fietkau
e3efdcfe15 uloop: fix event delete races on mac os x 2012-10-21 03:40:35 +02:00
Felix Fietkau
d6d6f11625 list.h: undefine LIST_HEAD to prevent conflicts on mac os x 2012-10-04 16:11:04 +02:00
Felix Fietkau
5038992465 lua: use relative paths for includes instead of system-wide 2012-10-04 14:14:52 +02:00
John Crispin
6ba84c7623 rename proc_cb to ul_process_cb
Signed-off-by: John Crispin <blogic@openwrt.org>
2012-09-29 01:15:54 +02:00
Felix Fietkau
0a81131257 add an example script for the uloop lua binding 2012-09-27 13:47:46 +02:00
Felix Fietkau
a81cb397ef add lua binding for uloop (written by John Crispin) 2012-09-27 13:41:02 +02:00
Felix Fietkau
cca2ed6c8c uloop: clear processes and timeouts on uloop_done() 2012-07-08 22:27:40 +02:00
Jo-Philipp Wich
0001d8ab26 uloop: handle EPOLLHUP like EPOLLERR to prevent infinite tight loops between epoll_wait() and the continue in uloop_run_events() 2012-07-07 18:17:40 +02:00
Felix Fietkau
bbdc3bdb05 blobmsg: remove the unnecessary name argument from blobmsg_check_attr_list, infer it from the list type 2012-06-24 21:11:06 +02:00
Felix Fietkau
f1494cde4d blobmsg: add blobmsg_check_attr_list() to validate element types of arrays and tables 2012-06-24 21:07:47 +02:00
Felix Fietkau
63bc6593c3 uloop: prevent fd callbacks for unregistered fds by ensuring that pointers in the epoll array are cleared 2012-06-24 21:06:16 +02:00
Felix Fietkau
eedf91d212 vlist.h: protect against multiple inclusions 2012-06-10 17:11:36 +02:00